2.0.2 • Published 8 years ago
trailpack-webpack2 v2.0.2
trailpack-webpack2
Webpack 2.x Trailpack
Install
$ npm install --save trailpack-webpack2
Configure
Enable this trailpack:
// config/main.js
module.exports = {
packs: [
// ... other trailpacks
require('trailpack-webpack2')
]
}
Configure Webpack options:
// config/webpack.js
const path = require('path')
module.exports = {
// Webpack configuration
options: {
entry: [
'./src/main.js'
],
output: {
path: path.join(__dirname, '../dist'),
filename: 'bundle.js',
publicPath: '/dist/'
},
module: {
rules: [
// Custom loaders here (babel, etc)
]
},
performance: {
hints: false
}
},
// Enable watching for changes
watch: (process.env.NODE_ENV === 'development'),
watchOptions: {
aggregateTimeout: 300,
poll: 1000
}
}