-
-
Save kasprownik/c83830601d142344ca4a to your computer and use it in GitHub Desktop.
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 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