-
Notifications
You must be signed in to change notification settings - Fork 6
/
webpack.config.js
53 lines (46 loc) · 1.45 KB
/
webpack.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
const path = require('path')
const srcPath = path.join(__dirname, 'src') + path.sep
const widgetWebpack = require('materia-widget-development-kit/webpack-widget')
const rules = widgetWebpack.getDefaultRules()
const copy = [
...widgetWebpack.getDefaultCopyList()
]
const entries = {
'player': [
path.join(srcPath, 'player.html'),
// path.join(srcPath, 'player-events.js'),
// path.join(srcPath, 'player-logic.js'),
// path.join(srcPath, 'player-UI.js'),
// path.join(srcPath, 'player.js'),
path.join(srcPath, 'player-events.coffee'),
path.join(srcPath, 'player-logic.coffee'),
path.join(srcPath, 'player-UI.coffee'),
path.join(srcPath, 'player.coffee'),
path.join(srcPath, 'player.scss')
],
'creator': [
path.join(srcPath, 'creator.html'),
// path.join(srcPath, 'creator-events.js'),
// path.join(srcPath, 'creator-logic.js'),
// path.join(srcPath, 'creator-UI.js'),
// path.join(srcPath, 'creator.js'),
path.join(srcPath, 'creator-events.coffee'),
path.join(srcPath, 'creator-logic.coffee'),
path.join(srcPath, 'creator-UI.coffee'),
path.join(srcPath, 'creator.coffee'),
path.join(srcPath, 'creator.scss')
]
}
const customRules = [
rules.loadHTMLAndReplaceMateriaScripts,
rules.loadAndPrefixSASS,
rules.loaderCompileCoffee,
rules.copyImages,
]
const options = {
entries: entries,
copyList: copy,
moduleRules: customRules
}
const buildConfig = widgetWebpack.getLegacyWidgetBuildConfig(options)
module.exports = buildConfig