Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use transform babel plugins instead of proposal #1520

Merged
merged 2 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/porting-addons-to-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ Now that we've separated the test-app and docs app concerns from the addon, we c
4. `yarn add @embroider/addon-shim`. This is the only dependency a v2 addon needs (in order to interoperate with ember-cli.
5. We're going to set up a default build pipeline for things like template colocation and decorator support. Install these dev dependencies:

`yarn add --dev @embroider/addon-dev rollup @rollup/plugin-babel @babel/core @babel/plugin-proposal-class-properties @babel/plugin-proposal-decorators`
`yarn add --dev @embroider/addon-dev rollup @rollup/plugin-babel @babel/core @babel/plugin-transform-class-properties @babel/plugin-proposal-decorators`

6. Grab the [example babel config](https://github.com/embroider-build/embroider/blob/main/packages/addon-dev/sample-babel.config.json) and save it as `addon/babel.config.json`
- If you addon requires template transforms in order to publish to a shareable format. Apply transforms using the `babel-plugin-ember-template-compilation`. View how to use this in the [example babel.config.js](https://github.com/embroider-build/embroider/blob/main/packages/addon-dev/sample-babel.config.js)
Expand Down
2 changes: 1 addition & 1 deletion packages/addon-dev/sample-babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ module.exports = {
},
],
['@babel/plugin-proposal-decorators', { legacy: true }],
'@babel/plugin-proposal-class-properties',
'@babel/plugin-transform-class-properties',
],
};
2 changes: 1 addition & 1 deletion packages/addon-dev/sample-babel.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"plugins": [
"@embroider/addon-dev/template-colocation-plugin",
["@babel/plugin-proposal-decorators", { "legacy": true }],
"@babel/plugin-proposal-class-properties"
"@babel/plugin-transform-class-properties"
]
}
2 changes: 1 addition & 1 deletion packages/macros/tests/babel/macro-condition.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('macroCondition', function () {
babelConfig(version: number) {
let babelConfig = makeBabelConfig(version, config);
if (version === 7) {
babelConfig.plugins.push('@babel/plugin-proposal-class-properties');
babelConfig.plugins.push('@babel/plugin-transform-class-properties');
}
babelConfig.filename = filename;
return babelConfig;
Expand Down
Loading