diff --git a/webpack.config.js b/webpack.config.js index 1eab3652..d5243897 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -41,6 +41,12 @@ Encore // only needed for CDN's or subdirectory deploy (this should not be needeed, as we use auto public path) //.setManifestKeyPrefix('build/') + //Use build/ as public path inisde the manifest.json (instead of "auto") + //Without this all webpack managed stuff which is loaded via the assets() twig function will not work + .configureManifestPlugin(options => { + options.publicPath = 'build/'; + }) + /* * ENTRY CONFIG * @@ -185,4 +191,4 @@ module.exports = Encore.getWebpackConfig(); //Enable webpack auto public path (this only works in combination with WebpackAutoPathSubscriber!!) //We do it here to supress a warning caused by webpack Encore -module.exports.output.publicPath = 'auto'; \ No newline at end of file +module.exports.output.publicPath = 'auto';