-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.babel.js
48 lines (42 loc) · 1016 Bytes
/
webpack.config.babel.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
import path from 'path'
import webpack from 'webpack'
import ExtractTextPlugin from 'extract-text-webpack-plugin'
export const serverPort = 9080
export const serverURI = `http://localhost:${serverPort}`
export default {
entry: {
issue: './src/entries/issue.js',
},
output: {
path: path.join(__dirname, 'public/js'),
filename: '[name].js',
publicPath: `${serverURI}/assets/build/`,
},
resolve: {
extensions: ['', '.js', '.jsx'],
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(),
new ExtractTextPlugin('[name].css'),
],
module: {
loaders: [
{
test: /\.jsx?$/,
loader: 'babel',
exclude: /node_modules/,
},
{
test: /.s?css$/,
loaders: [
'style',
'css?modules&importLoaders=1&localIdentName=[path]___[name]__[local]___[hash:base64:5]',
'resolve-url',
'sass',
],
exclude: /node_modules/,
},
],
},
};