1
0
mirror of https://github.com/ascribe/onion.git synced 2025-01-03 10:25:08 +01:00

Always build with /static as the public path for the assets

This commit is contained in:
Brett Sun 2016-06-02 17:08:03 +02:00
parent 92978269cc
commit 173d3d19b7
2 changed files with 1 additions and 4 deletions

View File

@ -20,15 +20,11 @@ config.entry.unshift(`webpack-dev-server/client?http://${HOST}:${PORT}/`,
'webpack/hot/dev-server'); 'webpack/hot/dev-server');
config.plugins.push(new webpack.HotModuleReplacementPlugin()); config.plugins.push(new webpack.HotModuleReplacementPlugin());
// Specify output location for bundled files
config.output.publicPath = '/static/';
// Configure server // Configure server
const compiler = webpack(config); const compiler = webpack(config);
const server = new WebpackDevServer(compiler, { const server = new WebpackDevServer(compiler, {
publicPath: config.output.publicPath, publicPath: config.output.publicPath,
contentBase: './build',
historyApiFallback: { historyApiFallback: {
index: config.output.publicPath index: config.output.publicPath
}, },

View File

@ -191,6 +191,7 @@ const config = {
output: { output: {
filename: PRODUCTION ? 'js/bundle.min.js' : 'js/bundle.js', filename: PRODUCTION ? 'js/bundle.min.js' : 'js/bundle.js',
path: PRODUCTION ? PATHS.DIST : PATHS.BUILD, path: PRODUCTION ? PATHS.DIST : PATHS.BUILD,
publicPath: '/static/',
}, },
debug: !PRODUCTION, debug: !PRODUCTION,