modification des assets pour theme
This commit is contained in:
@ -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];
|
Reference in New Issue
Block a user