-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
37 lines (36 loc) · 1.11 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
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var path = require('path');
module.exports = {
devtool: 'eval-source-map',
entry: __dirname + '/app/app.js',
output: {
path: __dirname + '/bin',
filename: 'app.bundle.js'
},
module: {
loaders: [
{ test: /\.json$/, loader: 'json' },
//{ test: /\.(js|jsx)$/, exclude: __dirname + '/node_modules/', loaders: ['babel-loader'] },
{ test: /\.css$/, loader: 'style!css?modules!postcss' },
{ test: /\.(woff2?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/, loader: "file?name=fonts/[name].[ext]" }
]
},
postcss: [
require('autoprefixer')
],
plugins: [
new webpack.BannerPlugin("Copyright Easy Taxi Peru SAC"),
new HtmlWebpackPlugin({
template: __dirname + "/app/index.tmp.html"
}),
new webpack.HotModuleReplacementPlugin()
],
devServer: {
contentBase: __dirname + "/app/",
colors: true,
historyApiFallback: true,
inline: true,
hot: true
}
};