Update to babel 7 ?
See original GitHub issueIs there any plan to update aurelia-cli
to babel
7 soon?
It seems that these 2 requires messed transpilation when we want to use new babel
version:
https://github.com/aurelia/cli/blob/15b1f1f6d4ee74a5a429ca90651d61b0e8d8abdf/lib/project.js#L207-L218
And it seems that this transformation do the trick:
function installBabel() {
require('@babel/polyfill');
require('@babel/register')({
plugins: [
'@babel/plugin-transform-modules-commonjs'
],
ignore: [(filename) => {
let relativeFromProjectRoot = path.relative(this.directory, filename);
return !/^aurelia_project/.test(relativeFromProjectRoot);
}]
});
}
This will allow us to use improvements of @babel/preset-env
in a local .babelrc
file.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Upgrade to Babel 7
Upgrade to Babel 7 · All of Babel · Config Lookup Changes · Yearly Preset Deprecations · Stage Preset Deprecations · Remove proposal...
Read more >How to upgrade to babel 7 - Stack Overflow
Most of the packages in Babel has been renamed to follow the pattern @babel/PACKAGE_NAME . So if you want to upgrade, change the...
Read more >Babel upgrade from babel 6.x to 7.0 | by maicmi | Medium
Babel upgrade from babel 6.x to 7.0. Usually, I build a new project, I use the default value configuration which provided from babel...
Read more >npx babel-upgrade - GitHub
Run at the root of your git repo: If using npm < v5.2.0, install npx globally. ... Without the --write (or -w )...
Read more >babel-upgrade - npm
Upgrade tool for Babel. Latest version: 1.0.1, last published: 4 years ago. Start using babel-upgrade in your project by running `npm i ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
A couple of weeks ago there was a meeting with Yahuda, who is working on the decorators spec, and the major framework leaders. I’m completely up to speed about where decorators is at now 😃 The new spec looks very good and is poised to move into stage 3. At that point, we’ll probably see transpiler and polyfill implementations. During that meeting we also talked about compatibility layers for transpiler migration. I think we’ll probably wait for that to happen before we make any moves. Otherwise, it’s a major breaking change to update our implementations. For vNext we can start from day 1 with the new spec.
you can use the legacy option with the new plugin, and if you’re using class-properties then the decorators plugin must come before class-properties pluginn and the later must must use loose mode: