Created
October 6, 2015 03:00
-
-
Save bceskavich/19146aa80868a4ee9c9b to your computer and use it in GitHub Desktop.
config/webpack.base.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// config/webpack.base.js | |
var path = require(‘path’); | |
var config = require(‘config’); | |
var webpack = require(‘webpack’); | |
var HtmlWebpackPlugin = require(‘html-webpack-plugin’); | |
module.exports = { | |
cache: true, | |
output: { | |
path: config.get(‘webpack.output.path’), | |
publicPath: ‘/assets/’, | |
filename: ‘app.[hash].js’, | |
}, | |
module: { | |
loaders: [ | |
{ | |
test: /\.(jpe?g|png|gif|svg|ico|pdf)$/i, | |
loader: ‘url-loader?limit=8192’ | |
} | |
] | |
}, | |
plugins: [ | |
new webpack.NoErrorsPlugin(), | |
new HtmlWebpackPlugin({ | |
env: config.get(‘env’), | |
filename: config.get(‘webpack.output.htmlPath’), | |
template: ‘src/templates/index.html’ | |
}), | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment