-
Notifications
You must be signed in to change notification settings - Fork 36
/
bundle.config.js
57 lines (56 loc) · 1.31 KB
/
bundle.config.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
// default result type is "html"
module.exports = {
bundle: {
base: {
scripts: './scripts/base.js',
styles: './styles/base.css',
options: {
rev: false,
uglify: false, // this has to be false, otherwise uglify will blow up when trying to parse a .jsx file
result: {
type: {
scripts: 'jsx',
styles: 'html'
}
}
}
},
default: {
scripts: './scripts/default.js',
styles: './styles/default.css',
options: {
rev: false,
result: {
type: 'html' // applies to both scripts and styles
}
}
},
plain: {
scripts: './scripts/plain.js',
styles: './styles/plain.css',
options: {
rev: false,
result: {
type: 'plain'
}
}
},
custom: {
scripts: './scripts/custom.js',
styles: './styles/custom.css',
options: {
rev: false,
result: {
type: {
scripts: function xJavascript(path) {
return "<script async src='" + path + "' type='application/javascript'></script>";
},
styles: function html(path) {
return "<link href='" + path + "' type='text/html'/>";
}
}
}
}
}
}
};