Last active
January 12, 2016 21:22
-
-
Save skywritergr/fb09073e6606b4c51f19 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 webpack = require('webpack'); | |
module.exports = { | |
entry: './public/js/render.jsx', | |
output: { | |
// Output the bundled file. | |
path: './public/build', | |
// Use the name specified in the entry key as name for the bundle file. | |
filename: 'bundle.js' | |
}, | |
module: { | |
loaders: [{ | |
// Test for js or jsx files. | |
test: /\.jsx?$/, | |
exclude: /node_modules/, | |
loader: 'babel' | |
}] | |
}, | |
externals: { | |
// Don't bundle the 'react' npm package with the component. | |
'react': 'React' | |
}, | |
resolve: { | |
// Include empty string '' to resolve files by their explicit extension | |
// (e.g. require('./somefile.ext')). | |
// Include '.js', '.jsx' to resolve files by these implicit extensions | |
// (e.g. require('underscore')). | |
extensions: ['', '.js', '.jsx'] | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment