-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.dev.config.js
45 lines (44 loc) · 1.17 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
import webpack from 'webpack'
import path from 'path'
export default [{
name: 'demo',
devtool: 'inline-source-map',
entry: {
snake: path.resolve(__dirname, 'demo/snake/index.js')
},
target: 'web',
output: {
path: __dirname + '/demo/dist', // Note: Physical files are only output by the production build task `npm run build`.
publicPath: '/',
filename: '[name].js'
},
devServer: {
contentBase: path.resolve(__dirname)
},
module: {
loaders: [
{test: /\.js$/, include: path.join(__dirname, 'src'), loaders: ['babel-loader']},
{test: /(\.scss)$/, include: path.join(__dirname, 'src'), loaders: ['style-loader', 'css-loader', 'sass-loader']}
]
}
}, {
name: 'source',
devtool: 'inline-source-map',
entry: [
path.resolve(__dirname, 'src/gamux.js')
],
target: 'web',
output: {
path: __dirname + '/dist', // Note: Physical files are only output by the production build task `npm run build`.
publicPath: '/',
filename: 'gamux.js'
},
devServer: {
contentBase: path.resolve(__dirname)
},
module: {
loaders: [
{test: /\.js$/, include: path.join(__dirname, 'src'), loaders: ['babel-loader']}
]
}
}]