-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathwebpack.config.js
More file actions
35 lines (33 loc) · 925 Bytes
/
webpack.config.js
File metadata and controls
35 lines (33 loc) · 925 Bytes
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
'use strict';
var webpack = require('webpack');
module.exports = {
entry: {
app:'./src/assets/js/apps/apps.js',
lib: ["babel/polyfill", 'react', 'react-router', 'flummox', 'jquery', 'superagent', 'cheerio', 'fastclick', 'd3', 'lru-cache']
},
output: {
path: __dirname + '/dest/assets/js',
filename: 'apps.js',
publicPath: '/assets/js/'
},
devtool: "#source-map",
plugins: [
// new webpack.optimize.UglifyJsPlugin({
// compress: {
// warnings: false
// }
// }),
new webpack.optimize.CommonsChunkPlugin("lib", 'lib.js')
],
resolve: {
extensions: ["", ".jsx", ".js", ".json"]
},
cache: true,
module: {
loaders: [
{ test: /\.jsx?$/, loaders: ['babel-loader?stage=1'], exclude: /node_modules/ },
{ test: /\.js?$/, loaders: ['babel-loader?stage=1'], exclude: /node_modules/ },
{ test: /\.json$/, loader: "json-loader" }
]
}
};