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
36 lines (30 loc) · 861 Bytes
/
webpack.config.dev.js
File metadata and controls
36 lines (30 loc) · 861 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
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()
];
config.entry.app = [];
config.module.rules = config.module.rules.concat([
{
test: /\.css$/,
loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
},
{
test: /\.html$/,
loader: 'html-loader'
},
{
test: /\.(png|jpg)$/,
loader: 'url-loader'
}
]);
export default config;