Skip to content

Instantly share code, notes, and snippets.

@matstc
Last active May 18, 2018 16:20
Show Gist options
  • Save matstc/b87660a49cb5c90f01a2f994859fc628 to your computer and use it in GitHub Desktop.
Save matstc/b87660a49cb5c90f01a2f994859fc628 to your computer and use it in GitHub Desktop.
Simple webpack 2 config with ES6 modules
let webpack = require('webpack')
module.exports = {
devtool: 'inline-sourcemap',
context: __dirname,
entry: "./index.js",
output: {
path: "./js",
publicPath: '/js',
filename: "bundle.js"
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['es2015']
}
}
]
}
}
@mazurick
Copy link

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment