Last active
August 29, 2015 14:09
-
-
Save ryanflorence/cde19eb43d36408a9626 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
// built files are found at /public/__build__/* | |
// how do I get `webpack` to build to `public/__build__/` | |
// but have the webpack dev server serve `public/index.html` | |
// and the bundles from `/__build__/`? | |
// | |
// I'm using this to run the server | |
// | |
// webpack-dev-server --inline --content-base public/ | |
// | |
// and this is my config: | |
var webpack = require('webpack'); | |
module.exports = { | |
entry: { | |
app: './app/main.js', | |
vendor: ['react', 'react-router'] | |
}, | |
output: { | |
filename: 'public/__build__/app.js' | |
}, | |
module: { | |
loaders: [ | |
{test: /\.js$/, loader: 'jsx-loader?harmony&insertPragma=React.DOM'} | |
] | |
}, | |
plugins: [ | |
new webpack.optimize.CommonsChunkPlugin('vendor', 'public/__build__/vendor.js') | |
] | |
}; |
akiran
commented
Nov 17, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment