-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
37 lines (32 loc) · 884 Bytes
/
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
const path = require('path');
const webpack = require('webpack');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var BUILD_DIR = path.join(__dirname, 'dist');
var APP_DIR = path.join(__dirname, 'app');
var config = {
// devtool: 'cheap-module-source-map',
devtool: 'eval',
entry: APP_DIR + '/index'
,
output: {
path: BUILD_DIR,
filename: 'bundle.js',
publicPath: '/'
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development')
})
],
module: {
loaders: [{
test: /\.jsx?$/,
loaders: ['babel'],
include: APP_DIR
}, {
test: /\.json?$/,
loader: 'json'
}, { test: /\.less$/, loader: "style!css!less" }]
}
};
module.exports = config;