forked from kpcyrd/ipfs.ink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
38 lines (35 loc) · 1.01 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
var Webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var path = require('path');
var assetsPath = path.resolve(__dirname, 'public', 'assets');
var entryPath = path.resolve(__dirname, 'frontend', 'app.es6.js');
var stylePath = path.resolve(__dirname, 'frontend', 'style.css');
var host = process.env.APP_HOST || 'localhost';
var config = {
devtool: 'eval',
entry: {
'bundle.js': entryPath,
'style.css': stylePath,
},
output: {
path: assetsPath,
filename: '[name]'
},
module: {
loaders: [{
test: /\.es6\.js$/,
loader: 'babel-loader',
query: {
presets: ['es2015']
}
}, {
test: /\.css$/,
loader: ExtractTextPlugin.extract('css-loader?minimize')
}]
},
plugins: [
new Webpack.HotModuleReplacementPlugin(),
new ExtractTextPlugin({ filename: '[name]', allChunks: true }),
]
};
module.exports = config;