-
Notifications
You must be signed in to change notification settings - Fork 37
/
kit-app-shell.conf.js
81 lines (80 loc) · 2.54 KB
/
kit-app-shell.conf.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
const DefineBuster = {
'typeof define': `'undefined'`,
};
/**
* @type {import('../kit-app-shell/packages/core/types').KashConfig}
*/
module.exports = {
build: {
resources: [
'./lib/vendor/ace/theme-dawn.js',
'./lib/vendor/ace/mode-coffee.js',
'./lib/vendor/ace/worker-coffee.js',
'./assets/button-icons/**/*',
'./assets/category-icons/**/*',
'./assets/challenges/**/*',
'./assets/layout/**/*',
'./assets/mischiefweek/**/*',
'./assets/pixelhack/**/*',
'./assets/sounds/**/*',
'./assets/summercamp/**/*',
'./assets/*.png',
'./icon/*.png',
'./www/css/**/*',
'./www/directive/**/*',
'./www/fonts/**/*',
'./www/locales/**/*',
'./www/partial/**/*',
'./www/*.html',
],
moduleContext: {
[require.resolve('./lib/vendor/ace/ace.js')]: 'window',
[require.resolve('marked/marked.min.js')]: 'window',
[require.resolve('coffeescript/lib/coffeescript-browser-compiler-legacy/coffeescript.js')]: 'window'
},
replaces: [{
include: [
require.resolve('./index.js'),
],
values: {
[`// inject:ga`]: `import './ga.js';`,
},
},{
include: [
require.resolve('marked/marked.min.js'),
require.resolve('coffeescript/lib/coffeescript-browser-compiler-legacy/coffeescript.js'),
],
values: DefineBuster,
}, {
// Angular is bad at guessing things, It tries to use the base href to do routing.
// This forces angular to use the root as base for the app
include: [require.resolve('angular/angular.js')],
values: {
'self.baseHref = function() {': 'self.baseHref = function() {return "/";',
}
}],
},
run: {
replaces: [
{
include: [require.resolve('coffeescript/lib/coffeescript-browser-compiler-legacy/coffeescript.js')],
values: {
'CoffeeScript})(this);': 'CoffeeScript})(window);'
},
},
],
},
web: {
port: 4000,
build: {
// Target platform for web builds
targets: {
chrome: 53,
ios: 10,
safari: 10,
},
},
},
uwp: {},
test: {},
};