forked from luketheobscure/percy-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ember-cli-build.js
81 lines (78 loc) · 2.16 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/* eslint-env node */
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
const Funnel = require('broccoli-funnel');
module.exports = function(defaults) {
let app = new EmberApp(defaults, {
'ember-cli-babel': {
includePolyfill: true,
},
'ember-cli-mocha': {
useLintTree: false,
},
// see https://github.com/ember-cli/ember-cli/issues/8075 for info
'ember-cli-uglify': {
uglify: {
compress: {
collapse_vars: false,
},
},
},
postcssOptions: {
compile: {
plugins: [
require('postcss-import')({path: ['node_modules']}),
require('postcss-for'),
require('postcss-nested'),
require('tailwindcss')('./tailwind.config.js'),
require('autoprefixer')({overrideBrowserslist: ['last 3 versions']}),
require('cssnano')({
preset: [
'default',
{
discardComments: {
removeAll: true,
},
},
],
}),
],
},
},
fingerprint: {
extensions: ['js', 'css', 'png', 'jpg', 'gif', 'map', 'svg'],
prepend: '/static/',
},
svg: {
paths: ['public/images/icons', 'public/images/logos', 'public/images/icons/tech'],
optimize: {
plugins: [{removeEmptyAttrs: false}, {cleanupIDs: {minify: false}}, {mergePaths: false}],
},
},
sourcemaps: {
enabled: true,
},
autoImport: {
webpack: {
node: {
path: true,
},
},
},
minifyCSS: {
enabled: false,
},
});
app.import('node_modules/hint.css/hint.css');
app.import('node_modules/sinon-chai/lib/sinon-chai.js', {type: 'test'});
app.import('node_modules/seedrandom/seedrandom.js');
app.import('node_modules/siema/dist/siema.min.js');
app.import('node_modules/tributejs/dist/tribute.js');
app.import('node_modules/tributejs/dist/tribute.css');
var extraAssets;
if (app.env === 'development' || app.env === 'test') {
extraAssets = new Funnel('tests/public/images/test', {
destDir: 'images/test',
});
}
return app.toTree(extraAssets);
};