-
-
Notifications
You must be signed in to change notification settings - Fork 199
Expand file tree
/
Copy pathember-cli-build.js
More file actions
116 lines (104 loc) · 2.77 KB
/
Copy pathember-cli-build.js
File metadata and controls
116 lines (104 loc) · 2.77 KB
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
'use strict';
const { compatBuild } = require('@embroider/compat');
const { Webpack } = require('@embroider/webpack');
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
const { prerender } = require('prember');
module.exports = function (defaults) {
const app = new EmberApp(defaults, {
babel: {
plugins: [require.resolve('ember-auto-import/babel-plugin')],
},
'ember-cli-babel': {
enableTypeScriptTransform: true,
},
emberData: {
deprecations: {
// New projects can safely leave this deprecation disabled.
// If upgrading, to opt-into the deprecated behavior, set this to true and then follow:
// https://deprecations.emberjs.com/id/ember-data-deprecate-store-extends-ember-object
// before upgrading to Ember Data 6.0
DEPRECATE_STORE_EXTENDS_EMBER_OBJECT: false,
},
},
'ember-leaflet': {
excludeJS: true,
},
fingerprint: {
// don't fingerprint images because we need to be able to access them dynamically
// see more info here: https://github.com/ef4/prember/issues/52
extensions: ['js', 'css', 'map'],
generateAssetMap: true,
fingerprintAssetMap: true,
},
ifa: {
enabled: true,
inline: true,
},
minifyCSS: {
options: { processImport: true },
},
prember: {
urls: [
'/',
'about/legal',
'browser-support',
'community',
'community/black-lives-matter',
'community/meetups',
'community/meetups/assets',
'community/meetups-getting-started',
'editions',
'editions/octane',
'ember-users',
'guidelines',
'learn',
'learn/examples',
'logos',
'mascots',
'mascots/commission',
'mascots/commission-sent',
'mascots/faq',
'mascots/payment',
'mascots/payment-sent',
'releases',
'releases/beta',
'releases/canary',
'releases/lts',
'releases/release',
'security',
'sponsors',
'survey/2016',
'survey/2017',
'survey/2018',
'survey/2019',
'survey/2020',
'survey/2021',
'teams',
],
},
});
const options = {
packagerOptions: {
publicAssetURL: '/',
webpackConfig: {
resolve: {
alias: {
'ember-composable-helpers':
'@nullvoxpopuli/ember-composable-helpers',
},
},
},
},
skipBabel: [
{
package: 'qunit',
},
],
staticAddonTestSupportTrees: true,
staticAddonTrees: true,
staticEmberSource: true,
staticInvokables: true,
};
const compiledApp = compatBuild(app, Webpack, options);
return prerender(app, compiledApp);
};