-
Notifications
You must be signed in to change notification settings - Fork 2
/
ember-cli-build.js
47 lines (42 loc) · 1.22 KB
/
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
43
44
45
46
47
'use strict';
const path = require('path');
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
function isProduction() {
return EmberApp.env() === 'production';
}
module.exports = function (defaults) {
const app = new EmberApp(defaults, {});
const { Webpack } = require('@embroider/webpack');
return require('@embroider/compat').compatBuild(app, Webpack, {
packagerOptions: {
babelLoaderOptions: [],
webpackConfig: {
module: {
rules: [
{
// When webpack sees an import for a CSS files
test: /(node_modules(\/|\\)\.embroider(\/|\\)rewritten-app(\/|\\))(.*\.css)$/i,
use: [
{
// use the PostCSS loader addon
loader: 'postcss-loader',
options: {
sourceMap: isProduction() === false,
postcssOptions: {
config: './postcss.config.js',
},
},
},
],
},
{
// Static assets
test: /(\.ttf|\.svg)$/,
type: 'asset/resource'
}
],
},
},
}
});
};