Comments (6)
that is definitely a bug, thanks for reporting! do you have time to open a PR that fixes the issue?
from broccoli-babel-transpiler.
I think the right way to do this would be roughly like this:
var babelCorePath = path.dirname(require.resolve('@babel/core/package.json'));
in that case we shouldn't need the regex anymore at all
from broccoli-babel-transpiler.
Can do, but I'm not certain on the details. From what I can see, things changed quite a bit.
In the Babel packages I'm using - all from the v7 release - the polyfill is found in ./node_modules/@babel/polyfill/browser.js
; is that the right file to include? Should it be renamed?
from broccoli-babel-transpiler.
to be honest, I don't know. I guess it would make sense to resolve to @babel/polyfill
instead then. but in that case, we will need an explicit dependency on it.
from broccoli-babel-transpiler.
After spending some time with the code and its tests, I'm wondering what the desired outcome of adding the browserPolyfill
flag should actually be:
- just add the polyfill to the output tree?
- place it somewhere where Babel can resolve it while transpiling source scripts?
- all of the above?
Is the option even required for the current version of Babel? It's now all designed around separate packagers that eventually pull the polyfill into a bundle, and Babel will happily transpile scripts that require it even without the browser polyfill script visible at transpile-time.
from broccoli-babel-transpiler.
to be honest, I don't know the answers to that either. I would suggest to start digging in https://github.com/babel/ember-cli-babel and see if/how that option is used.
from broccoli-babel-transpiler.
Related Issues (20)
- Version 6.1.4 not tagged "latest" on npm HOT 2
- Update babel-7 branch with latest changes on master. HOT 1
- Improve parallel errors further
- warn/error if duplicate plugins provided
- .babelrc changes do not bust cache HOT 5
- Confusing error message for non-parallelizable plugin HOT 2
- Parallelization Does Not Interop Between Babel 6 and 7 HOT 3
- TypeError: Cannot read property '_parallelBabel' of null HOT 1
- upgrade node-workerpool for WorkerThread support HOT 3
- Share worker even if different babel version HOT 2
- Worker process not terminated when Babel emits ReferenceError on malformed options HOT 15
- Trouble getting transpiled JS to work in the browser HOT 4
- Suggest using core-js directly HOT 3
- Remove `options.browserPolyfill` option.
- Move babel specific options into `options.babel` property. HOT 1
- @babel/polyfill 7.4.0+ has been deprecated HOT 1
- New release HOT 3
- Does not support latest broccoli-persistent-filter HOT 3
- JOBS=1 does not result in babel transforms being run in the main ember-cli build process
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 broccoli-babel-transpiler.