-
Notifications
You must be signed in to change notification settings - Fork 78
/
Copy pathwebpack.config.js
61 lines (55 loc) · 1.48 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
54
55
56
57
58
59
60
61
const path = require('path');
const Webpack = require('webpack');
const modulePaths = [
'scripts',
path.join(__dirname, 'node_modules')
];
module.exports = {
entry: 'main.js',
output: {
path: path.join(__dirname, 'dist'),
filename: 'main.js',
},
devtool: 'source-map',
resolveLoader: {
// http://webpack.github.io/docs/troubleshooting.html#npm-linked-modules-doesn-t-find-their-dependencies
fallback: modulePaths,
alias: {
text: 'raw-loader'
}
},
resolve: {
modulesDirectories: modulePaths,
// http://webpack.github.io/docs/troubleshooting.html#npm-linked-modules-doesn-t-find-their-dependencies
fallback: modulePaths,
alias: {
underscore: 'lodash',
jquery: 'lib/custom-jquery',
'jquery-mousewheel': 'jquery-mousewheel/jquery.mousewheel',
'jquery-dragon': 'jquery-dragon/src/jquery.dragon',
'jquery-cubelet': 'jquery-cubelet/dist/jquery.cubelet',
shifty: 'shifty/dist/shifty',
rekapi: 'rekapi/dist/rekapi',
keydrown: 'keydrown/dist/keydrown',
backbone: 'backbone/backbone',
lateralus: 'lateralus/dist/lateralus',
'lateralus.component.tabs': 'lateralus-components/tabs/main',
aenima: 'aenima',
bezierizer: 'bezierizer/dist/bezierizer'
}
},
plugins: [
new Webpack.optimize.UglifyJsPlugin({
compress: {
dead_code: true,
unused: true
},
output: {
comments: false
}
})
],
devServer: {
port: 9005
}
};