-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathwebpack.dev.config.js
50 lines (43 loc) · 1.03 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
43
44
45
46
47
48
49
50
var path = require('path');
var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
devtool : "eval",
debug : true,
entry: [
'webpack-dev-server/client?http://localhost:3000',
'./example/src/app.js'
],
output: {
path: path.join(__dirname, 'example', 'dist'), // Must be an absolute path
filename: 'bundle.js'
},
module: {
loaders: [
{
test: /\.js$/,
loaders: ['babel'],
include: [
path.join(__dirname, 'src'), // Must be an absolute path
path.join(__dirname, 'example', 'src') // Must be an absolute path
]
},
{
test: /\.scss$/,
loader: ExtractTextPlugin.extract('style', 'css!sass'),
exclude: /node_modules/
},
{
test: /\.json$/,
loaders: ["json"]
}
]
},
plugins: [
new ExtractTextPlugin('screen.css', { allChunks: true })
],
devServer : {
contentBase: "example/dist/",
"host": "0.0.0.0"
}
};