Last active
May 18, 2018 16:20
-
-
Save matstc/b87660a49cb5c90f01a2f994859fc628 to your computer and use it in GitHub Desktop.
Simple webpack 2 config with ES6 modules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'] | |
} | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you.