-
Notifications
You must be signed in to change notification settings - Fork 184
/
Copy pathwebpack.config.js
executable file
·55 lines (53 loc) · 1.56 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
var webpack = require('webpack');
path = require('path');
module.exports = {
entry: {
//add [] to fix: Module not found: Error: a dependency to an entry point is not allowed
'./sdk/dist/websdk-1.4.13': ['./sdk/index'],
'./demo/javascript/dist/demo-1.4.16': ['./demo/javascript/src/entry'],
'./webrtc/dist/webrtc-1.4.13': ['./webrtc/src/entry']
},
output: {
path: './',
publicPath: './',
filename: '[name].js'
},
// devtool: '#eval-cheap-module-source-map',
resolve: {
extensions: ['', '.js', '.jsx']
},
module: {
loaders: [
{
test: /\.(js|jsx)$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
{
test: /\.scss$/,
loader: 'style-loader!css-loader!sass-loader'
},
{
test: /\.svg|woff|eot|ttf$/,
loader: require.resolve('file-loader') + '?name=[path][name].[ext]'
}
]
},
plugins: [
// new webpack.NoErrorsPlugin(),
// production must be with `UglifyJsPlugin` or ie9 crash
// faster your app better use
// https://github.com/facebook/react/issues/7803
// new webpack.DefinePlugin({
// 'process.env': {
// 'NODE_ENV': '"production"'
// }
// }),
// new webpack.optimize.UglifyJsPlugin({
// compressor: {
// warnings: false
// }
// })
],
}
;