forked from embroider-build/embroider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample-babel.config.js
25 lines (23 loc) · 955 Bytes
/
sample-babel.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Some addons need to transform their templates before they have a portable format.
// In "classic" builds this was done at the application. In embroider it should
// be done during the addon build.
const someAstTransformPlugin = require('./some-ast-transform-plugin');
// The `@embroider/addon-dev/template-transform-plugin` has the following options:
// `options.astTransforms` - an array of functions or paths to preprocess the GlimmerAST
// `options.compilerPath` - Optional: Defaults to `ember-source/dist/ember-template-compiler`
module.exports = {
plugins: [
'@embroider/addon-dev/template-colocation-plugin',
[
'@embroider/addon-dev/template-transform-plugin',
{
astTransforms: [
someAstTransformPlugin,
'./path/to/another-template-transform-plugin',
],
},
],
['@babel/plugin-proposal-decorators', { legacy: true }],
'@babel/plugin-proposal-class-properties',
],
};