-
Notifications
You must be signed in to change notification settings - Fork 10
/
webpack.config.js
42 lines (40 loc) · 941 Bytes
/
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
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const webpack = require('webpack')
const config = {
entry: {
app: ['./src/client/app.js']
},
module: {
loaders: [
{ test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader'
},
{
test: /\.scss$/,
exclude: /node_modules/,
loader: ExtractTextPlugin.extract('style-loader', 'css-loader?-url&sourceMap!sass-loader')
},
{
test: /\.html$/,
exclude: /node_modules/,
loader: 'html-loader?attrs=false'
}
]
},
output: {
filename: 'bundle.js',
path: './'
},
plugins: [
new ExtractTextPlugin('bundle.css'),
new webpack.IgnorePlugin(/vertx/)
],
resolve: {
extensions: ['', '.scss', '.js', '.html'],
modulesDirectories: ['src', 'node_modules']
},
devtool: '#inline-source-map',
target: 'electron'
}
module.exports = config