Created
April 10, 2017 19:32
-
-
Save danielmelogpi/b9369c50c8808656a04d00ee24a22569 to your computer and use it in GitHub Desktop.
webpack
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
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