Skip to content

Instantly share code, notes, and snippets.

@danielmelogpi
Created April 10, 2017 19:32
Show Gist options
  • Save danielmelogpi/b9369c50c8808656a04d00ee24a22569 to your computer and use it in GitHub Desktop.
Save danielmelogpi/b9369c50c8808656a04d00ee24a22569 to your computer and use it in GitHub Desktop.
webpack
var webpack = require("webpack");
var path = require("path");
module.exports = {
entry: path.resolve(__dirname, "src/app.js"),
output: {
path: path.resolve(__dirname, "dist"),
filename: "bundle.js",
sourceMapFilename: "bundle.source.map"
},
module: {
loaders: [
{
loader: "babel-loader",
// Skip any files outside of your project's `src` directory
include: [
path.resolve(__dirname, "src"),
],
// Only run `.js` and `.jsx` files through Babel
test: /\.js?$/,
// Options to configure babel with
query: {
plugins: ['transform-runtime'],
presets: ['es2015'],
}
},
]
},
devtool: 'source-map'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment