forked from ember-learn/ember-octane-vs-classic-cheat-sheet
-
Notifications
You must be signed in to change notification settings - Fork 10
/
ember-cli-build.js
42 lines (36 loc) · 931 Bytes
/
ember-cli-build.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
'use strict';
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
const { LEGACY } = process.env;
module.exports = function (defaults) {
let app = new EmberApp(defaults, {
// custom options here
});
if (LEGACY) {
return app.toTree();
}
const { Webpack } = require('@embroider/webpack');
return require('@embroider/compat').compatBuild(app, Webpack, {
staticAddonTrees: true,
staticAddonTestSupportTrees: true,
staticHelpers: true,
staticComponents: true,
// splitAtRoutes: ['docs', 'docs.templates'],
packagerOptions: {
webpackConfig: {
module: {
rules: [
{
test: /\.css$i/,
loader: 'postcss-loader',
options: {
postcssOptions: {
plugins: ['postcss-import'],
},
},
},
],
},
},
},
});
};