-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathember-cli-build.js
64 lines (61 loc) · 1.35 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
'use strict';
const GlimmerApp = require('@glimmer/application-pipeline').GlimmerApp;
const resolve = require('rollup-plugin-node-resolve');
const commonjs = require('rollup-plugin-commonjs');
const prod = process.env.EMBER_ENV === 'production';
module.exports = function(defaults) {
let app = new GlimmerApp(defaults, {
rollup: {
plugins: [
resolve({ jsnext: true, module: true, main: true }),
commonjs()
]
},
addons: {
blacklist: prod ? [] : ['ember-service-worker'],
},
'asset-cache': {
include: [
'assets/**/*',
'**/*',
'sw-registration.js',
],
exclude: [
'**/*.txt',
'**/*.css',
'test.json',
'sw.js',
],
version: 1,
requestMode: 'cors',
},
'esw-cache-fallback': {
patterns: [
'https://developers.zomato.com/api/(.+)',
],
},
minifyJS: {
enabled: prod,
options: {
mangle: true,
},
},
minifyCSS: {
enabled: prod,
},
inlineContent: {
'critical-css': 'src/ui/styles/app.css',
},
minifyHTML: {
enabled: prod,
htmlFiles: ['index.html'],
minifierOptions: {
collapseWhitespace: true,
removeComments: true,
minifyJS: true,
minifyCSS: true,
},
},
});
return app.toTree();
};