Skip to content

Instantly share code, notes, and snippets.

@chathurangat
Last active May 24, 2018 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chathurangat/56fca1226c3996b14ed95ca28ab7156c to your computer and use it in GitHub Desktop.
Save chathurangat/56fca1226c3996b14ed95ca28ab7156c to your computer and use it in GitHub Desktop.
const path = require('path');
module.exports = {
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
options: {
presets: ['env']
}
}
]
},
entry: {
//there can be multiple entry files
file1: './src/js/app.js'
},
output: {
//publicPath: "public/dist",
filename: 'final.bundle.js',
path: path.resolve(__dirname, 'dist')
},
devServer: {
contentBase: path.join(__dirname, "dist/"),
port: 9000
},
mode: 'development'
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment