forked from loryjs/lory
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.dev.js
More file actions
37 lines (31 loc) · 885 Bytes
/
webpack.config.dev.js
File metadata and controls
37 lines (31 loc) · 885 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
36
37
import webpack from 'webpack';
import baseConfig from './webpack.config.base';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import _debug from 'debug';
import ExtractTextPlugin from 'extract-text-webpack-plugin';
let config = Object.create(baseConfig);
const debug = _debug('app:webpack:config');
debug('Enable plugins for live development (HMR, NoErrors).');
config.plugins = [
new HtmlWebpackPlugin({
template: 'src/index.html'
}),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
];
config.entry.app = [];
config.module.loaders = config.module.loaders.concat([
{
test: /\.css$/,
loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
},
{
test: /\.html$/,
loader: 'html'
},
{
test: /\.(png|jpg)$/,
loader: 'url'
}
]);
export default config;