-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathember-cli-build.js
97 lines (92 loc) · 2.31 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/* eslint-env node */
'use strict';
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
module.exports = function (defaults) {
const pkg = require('./package.json');
let app = new EmberApp(defaults, {
// Use the polyfill for 'TypeError: _crypto.randomUUID is not a function'
'@embroider/macros': {
setConfig: {
'@ember-data/store': {
polyfillUUID: true
},
},
},
minifyCSS: {
options: { processImport: true }
},
'ember-cli-babel': {
includePolyfill: true
},
sourcemaps: {
enabled: true,
extensions: ['js']
},
babel: {
// ember-concurrency plugins for ember-power-select upgrade
plugins: [
// ... any other plugins
require.resolve("ember-concurrency/async-arrow-task-transform"),
// NOTE: put any code coverage plugins last, after the transform.
],
sourceMaps: 'inline'
},
'ember-bootstrap': {
insertEmberWormholeElementToDom: false,
importBootstrapCSS: false,
bootstrapVersion: 5
},
// 'ember-cli-terser': {
// enabled: true
// },
'ember-prism': {
theme: 'default',
plugins: ['line-highlight']
},
inlineContent: {
'site-title': {
content: process.env.SITE_TITLE || 'DataCite Fabrica'
},
'cdn-url': {
content: process.env.CDN_URL || 'https://assets.datacite.org'
}
},
'ember-power-select': {
theme: 'bootstrap'
},
'ember-math-helpers': {
only: ['add', 'sub']
},
'ember-simple-auth': {
useSessionSetupMethod: true
},
autoImport: {
forbidEval: true,
webpack: {
plugins: [
new NodePolyfillPlugin()
],
node: {
global: true
// fs: 'empty'
},
devtool: 'source-map'
/*
resolve: {
fallback: {
crypto: require.resolve('crypto-browserify'),
stream: require.resolve('stream-browserify'),
timers: require.resolve('timers-browserify'),
vm: require.resolve('vm-browserify')
},
alias: {
process: 'process/browser'
}
}
*/
}
}
});
return app.toTree();
};