/
webpack.config.js
36 lines (33 loc) · 1.04 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
var path = require('path');
var webpack = require('webpack');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
entry: './src/scripts/app.js',
output: {
path: path.join(__dirname, 'dist'),
filename: 'scripts/bundle.js'
},
devtool: 'inline-source-map',
module: {
loaders: [
{ test: /\.json$/, loader: "json" },
{ test: /\.(png|woff|woff2|eot|ttf|svg)$/, loader: 'url-loader?limit=100000' },
{ test: /\.css$/, loader: ExtractTextPlugin.extract("css-loader") },
{
test: path.join(__dirname, 'src/scripts'),
loader: 'babel-loader'
}
]
},
plugins: [
new ExtractTextPlugin("styles/[name].css", { allChunks: true }),
// new webpack.optimize.UglifyJsPlugin({minimize: false})
new CopyWebpackPlugin([
{
'from': 'app/',
'to': '.'
}
])
]
};