Skip to content

Instantly share code, notes, and snippets.

@igmoweb
Last active April 28, 2017 10:16
Show Gist options
  • Save igmoweb/fc946aebd2aad4e0fc27fa42452d5448 to your computer and use it in GitHub Desktop.
Save igmoweb/fc946aebd2aad4e0fc27fa42452d5448 to your computer and use it in GitHub Desktop.
Webpack with source maps (1)
const path = require( 'path' );
module.exports = {
entry: [
'./src/index.js'
],
output: {
filename: 'app.js',
path: path.resolve( __dirname, 'build' )
},
devtool: 'eval-source-map',
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
options: {
presets: ['es2015', 'react']
},
include: [
path.resolve( __dirname, 'src/' )
]
}
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment