modification des assets pour theme
Some checks are pending
Cadoles/hydra-sql/pipeline/pr-develop Build started...
Cadoles/hydra-sql/pipeline/head This commit looks good

This commit is contained in:
2023-01-10 15:24:53 +01:00
parent d7ada479c4
commit 744b3c3c06
29 changed files with 493 additions and 63 deletions

View File

@ -8,9 +8,9 @@ if (!Encore.isRuntimeEnvironmentConfigured()) {
Encore
// directory where compiled assets will be stored
.setOutputPath('public/build/')
.setOutputPath('public/build/app')
// public path used by the web server to access the output path
.setPublicPath('/build')
.setPublicPath('/build/app')
// only needed for CDN's or subdirectory deploy
//.setManifestKeyPrefix('build/')
@ -72,6 +72,35 @@ Encore
// uncomment if you're having problems with a jQuery plugin
//.autoProvidejQuery()
;
const appConfig = Encore.getWebpackConfig();
module.exports = Encore.getWebpackConfig();
// Set a unique name for the config (needed later!)
appConfig.name = 'appConfig';
// reset Encore to build the second config
Encore.reset();
;
Encore
// directory where compiled assets will be stored
.setOutputPath('public/build/theme/')
// public path used by the web server to access the output path
.setPublicPath('/build/theme')
.addEntry('theme','./public/theme-entrypoint.js')
.splitEntryChunks()
.enableSingleRuntimeChunk()
.enableBuildNotifications()
.enableSourceMaps(false)
.enableVersioning(false)
.enablePostCssLoader()
;
// build the second configuration
const themeConfig = Encore.getWebpackConfig();
// Set a unique name for the config (needed later!)
themeConfig.name = 'themeConfig';
;
// export the final configuration as an array of multiple configurations
module.exports = [appConfig, themeConfig];