-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
53 lines (50 loc) · 1.13 KB
/
webpack.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
51
52
53
require('babel-core/register');
const webpack = require('webpack');
const path = require('path');
const HtmlwebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const PATHS = {
bundle: path.resolve(__dirname, 'app/src/main.js'),
style: path.resolve(__dirname, 'app/styles/main.scss'),
build: path.resolve(__dirname, 'app/build'),
dev: path.resolve(__dirname, 'app/build/dev')
}
module.exports = {
entry: {
bundle: PATHS.bundle
},
output: {
path: PATHS.build,
publicPath: '/',
filename: '[name].js'
},
resolve: {
extensions: ['', '.js', '.jsx'],
},
plugins: [],
devtool: 'source-map',
devServer: {
contentBase: PATHS.dev,
historyApiFallback: true,
hot: true,
inline: true,
progress: true
},
module: {
loaders: [
{
loader: 'babel',
exclude: /node_modules/,
test: /\.js[x]?$/,
query: {
//cacheDirectory: true,
presets: ['react', 'es2015', 'stage-0']
}
},
{
test: /\.scss$/,
loaders: ['style','css','sass']
}
]
}
}