forked from e-schultz/ng-summit-redux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
61 lines (58 loc) · 1.49 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
54
55
56
57
58
59
60
61
var path = require('path');
var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var sassLoaders = [
'css-loader',
'autoprefixer-loader?browsers=last 2 version',
'sass-loader?includePaths[]=' + path.resolve(__dirname, './src'),
];
module.exports = {
devtool: 'source-map',
entry: [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/dev-server',
'./src/index',
'./src/simple-party/index',
'./src/simple-party-dev-tools/index'
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/static/'
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(),
new ExtractTextPlugin('[name].[hash].css')
],
resolve: {
extensions: ['', '.js'],
fallback: path.join(__dirname, 'node_modules')
},
resolveLoader: {
fallback: path.join(__dirname, 'node_modules')
},
module: {
loaders: [{
test: /\.js$/,
loaders: ['babel'],
exclude: /node_modules/
}, {
test: /\.css?$/,
loaders: ['style', 'raw'],
exclude: /node_modules/
}, {
// SASS LOADER
// Reference: https://github.com/jtangelder/sass-loader
// Allow loading scss through js
test: /\.scss$/,
loader: 'style!css!sass'
}, {
// HTML LOADER
// Reference: https://github.com/webpack/raw-loader
// Allow loading html through js
test: /\.html$/,
loader: 'raw'
}]
}
};