Skip to content

Instantly share code, notes, and snippets.

@AaronFlower
Created December 11, 2017 15:01
Show Gist options
  • Select an option

  • Save AaronFlower/5fff79eea98b5045241994ff8faa6f5f to your computer and use it in GitHub Desktop.

Select an option

Save AaronFlower/5fff79eea98b5045241994ff8faa6f5f to your computer and use it in GitHub Desktop.
simple-webpack-config
const path = require('path')
const webpack = require('webpack')
const htmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
 entry: {
  app: './src/main.js',
  moduleA: './src/moduleA.js',
  moduleB: './src/moduleB.js',
  moduleC: './src/moduleC.js'
 },
 output: {
  path: path.resolve(__dirname, './dist'),
  filename: '[name].js'
 },
 plugins: [
  new htmlWebpackPlugin({
  title: 'Webpack CommonsChunkPlugin'
  })
 ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment