The frontend dependencies can now detect their path automatically.

Therefore it does not need to be configured in the webpack.config.js before compilation. This should help to make things like issue #426 easier to resolve.
This commit is contained in:
Jan Böhmer 2023-11-03 23:01:23 +01:00
parent bdcd51d533
commit 3ac82cf76a
3 changed files with 71 additions and 21 deletions

View file

@ -36,16 +36,9 @@ if (!Encore.isRuntimeEnvironmentConfigured()) {
Encore
// directory where compiled assets will be stored
.setOutputPath('public/build/')
// public path used by the web server to access the output path
// This value doesn't matter, as the public path is set to auto later down. This is just to prevent a warning
.setPublicPath('/build')
// only needed for CDN's or subdirectory deploy
//.setManifestKeyPrefix('build/')
/**
* If you are putting Part-DB into a sub directory you have to uncomment these lines and
* replace "part-db/" with your path to Part-DB
*/
//.setPublicPath('/part-db/build')
// only needed for CDN's or subdirectory deploy (this should not be needeed, as we use auto public path)
//.setManifestKeyPrefix('build/')
/*
@ -189,3 +182,7 @@ if (Encore.isDev()) {
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';