forked from aguestuser/show-me-the-money
-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.dev.config.js
executable file
·42 lines (40 loc) · 1.04 KB
/
webpack.dev.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
var path = require('path');
var webpack = require('webpack');
var node_modules = path.resolve(__dirname, 'node_modules/');
var config = {
entry: {
app: [
'webpack/hot/dev-server',
path.resolve(__dirname, 'app/main.jsx'),
],
},
output: {
path: path.resolve(__dirname, 'build'),
filename: 'oligrapher.min.js',
publicPath: 'http://localhost:8090/build',
library: 'Oligrapher',
libraryTarget: 'umd'
},
plugins: [
new webpack.optimize.CommonsChunkPlugin('vendors', 'vendors.js'),
new webpack.DefinePlugin({ "process.env": JSON.stringify(process.env)})
],
module: {
loaders: [
{ test: /\.jsx?$/,
exclude: [node_modules],
loaders: ['react-hot', 'babel'] },
{ test: /\.css$/,
loader: "style-loader!css-loader" },
{ test: /\.(woff2?|ttf|eot|svg)$/, loader: 'url?limit=30000' }
],
noParse:[]
},
resolve: {
alias: {
'react/lib': path.resolve(node_modules, 'react/lib')
},
extensions: ['', '.js', '.jsx']
}
};
module.exports = config;