-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
52 lines (49 loc) · 1.37 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
/* eslint-env node */
var path = require("path");
var webpack = require("webpack");
//var FlowCheck = require('webpack-plugin-flow');
//see: https://github.com/researchgate/webpack-plugin-flow
module.exports = {
resolve: {
alias: {
"ondomready$": path.join(__dirname,"./bower_components/ondomready/ondomready.js")//,
//"socket.io-client$": path.join(__dirname,"./bower_components/socket.io-client/socket.io.js")
},
// root: [
// path.join(__dirname, "bower_components"),
// ]
},
devtool:"source-map",
output: {
filename:'main.js'
},
plugins: [
new webpack.optimize.DedupePlugin(),
],
externals: {
"cocos2d":"{ cc: cc }"
},
module: {
// plugins: [
// new webpack.ResolverPlugin(
// new webpack.ResolverPlugin.DirectoryDescriptionFilePlugin("bower.json", ["main"])
// )
// ],
//
loaders: [{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel',
query: {
"cacheDirectory": "cache",
}
}, {
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'flowcheck'
}, {
test: /\.json$/,
loader: 'json'
}],
}
};