2.0.2 • Published 8 years ago

trailpack-webpack2 v2.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 years ago

trailpack-webpack2

NPM version

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
  }
}
2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago