-
Notifications
You must be signed in to change notification settings - Fork 200
Expand file tree
/
Copy pathwebpack.config.development.js
More file actions
33 lines (32 loc) · 964 Bytes
/
webpack.config.development.js
File metadata and controls
33 lines (32 loc) · 964 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
const pkg = require('./package');
const webpack = require('webpack');
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
context: __dirname,
devtool: 'inline-source-map',
entry: [
'webpack-hot-middleware/client',
'./spec/index.js'
],
output: {
path: path.join(__dirname, 'build'),
publicPath: '/build/',
filename: 'spec.js'
},
module: {
loaders: [{
test: /(\.scss|\.css)$/,
loader: ExtractTextPlugin.extract('style-loader', 'css?sourceMap&modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!postcss!sass?sourceMap')
}]
},
plugins: [
new ExtractTextPlugin('spec.css', {allChunks: true}),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('development'),
VERSION: JSON.stringify(pkg.version)
})
]
};