Skip to content

Instantly share code, notes, and snippets.

@kasprownik
Last active January 29, 2016 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kasprownik/c83830601d142344ca4a to your computer and use it in GitHub Desktop.
Save kasprownik/c83830601d142344ca4a to your computer and use it in GitHub Desktop.
var path = require('path');
var webpack = require('webpack');
module.exports = {
context: __dirname, //current folder as the reference to the other paths
entry: {
demo: './demo.js' //entry point for building scripts
},
output: {
path: path.resolve('./dist'), //save result in 'dist' folder
filename: 'demo.js'
},
module: {
loaders: [
{ //transpile ES2015 with JSX into ES5
test: /\.js?$/,
exclude: /node_modules/,
loader: 'babel',
query: {
presets: ['react', 'es2015']
}
}
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment