Comments (6)
Generators need the regeneratorRuntime
polyfill which comes from the babel-polyfill
module. You do need the modules and npm integration for that to work.
from babel-brunch.
ok, so I removed babel-runtime, and have this in the config:
babel: {
plugins: ['transform-async-to-generator']
}
everything compiles (good)
but I error in the browser (bad)
Uncaught ReferenceError: regeneratorRuntime is not defined
which is why I thought I needed the runtime in the first place ;)
from babel-brunch.
I don't see why babel runtime is needed here. Try it without the runtine.
from babel-brunch.
oh, blast. Thanks.
from babel-brunch.
not that I'm against moving to npm and modules, but I'm somewhat stuck with how I convert my existing js files (see example below) over to a module format (I have several dozen .js files (1 for each controller / factory / service etc)
/* global angular */
(() => {
'use strict';
/** @ngInject */
function sdkFactory($http) {
return {};
}
angular
.module('myApp')
.factory('sdkFactory', sdkFactory);
})();
from babel-brunch.
Closing, as not relevant anymore (I'm working out how to use ES6 modules).
thanks for the help.
from babel-brunch.
Related Issues (20)
- Transpile npm modules written in ES6 HOT 7
- Cannot use plugin or preset options HOT 2
- Use options defined in the .babelrc file HOT 6
- Allow plugins/presets with explicit name
- Support configuration for different environments. HOT 2
- transform-class-properties in .babelrc results in error HOT 7
- [BREAKING] Use babel-preset-env instead of babel-preset-latest HOT 5
- Source maps are mapped to transpiled source HOT 4
- babel polyfill included? HOT 3
- SyntaxError: Unexpected token when building HOT 2
- undefined is not a constructor (evaluating 'Object.assign') HOT 5
- Explicit plugin name without babel-plugin- prefix, how? HOT 1
- .babelrc is ignored HOT 1
- Publish new npm version HOT 3
- babel-preset-env has been consumed by Babel mono-repo
- Upgrading to Babel 7 HOT 2
- SyntaxError: export declarations may only appear at top level of a module HOT 2
- Optimizing of ../priv/static/js/app.js failed. L12175:31 SyntaxError: Unexpected token: operator (>)
- Update to @babel/preset-env HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babel-brunch.