@@ -7,6 +7,7 @@ interface IMetadataRuntime {
77 project : typeof import ( '../../project' ) . default ;
88 Engine : typeof import ( '../../engine' ) . Engine ;
99 builderConfig : typeof import ( '../../builder/share/builder-config' ) . default ;
10+ DefaultBundleConfig : typeof import ( '../../builder/share/bundle-utils' ) . DefaultBundleConfig ;
1011 pluginManager : typeof import ( '../../builder/manager/plugin' ) . pluginManager ;
1112 assetConfig : typeof import ( '../../assets/asset-config' ) . default ;
1213 scriptConfig : typeof import ( '../../scripting/shared/query-shared-settings' ) . scriptConfig ;
@@ -43,6 +44,7 @@ async function loadFreshRuntime(): Promise<IMetadataRuntime> {
4344 const project = ( require ( '../../project' ) as typeof import ( '../../project' ) ) . default ;
4445 const { Engine } = require ( '../../engine' ) as typeof import ( '../../engine' ) ;
4546 const builderConfig = ( require ( '../../builder/share/builder-config' ) as typeof import ( '../../builder/share/builder-config' ) ) . default ;
47+ const { DefaultBundleConfig } = require ( '../../builder/share/bundle-utils' ) as typeof import ( '../../builder/share/bundle-utils' ) ;
4648 const { pluginManager } = require ( '../../builder/manager/plugin' ) as typeof import ( '../../builder/manager/plugin' ) ;
4749 const assetConfig = ( require ( '../../assets/asset-config' ) as typeof import ( '../../assets/asset-config' ) ) . default ;
4850 const { scriptConfig } = require ( '../../scripting/shared/query-shared-settings' ) as typeof import ( '../../scripting/shared/query-shared-settings' ) ;
@@ -53,6 +55,7 @@ async function loadFreshRuntime(): Promise<IMetadataRuntime> {
5355 project,
5456 Engine,
5557 builderConfig,
58+ DefaultBundleConfig,
5659 pluginManager,
5760 assetConfig,
5861 scriptConfig,
@@ -141,15 +144,19 @@ describe('configuration metadata', () => {
141144 const textureCompressNode = findNode ( beforePlatformRegister , 'builder.textureCompressConfig' ) ;
142145 const bundleConfigNode = findNode ( beforePlatformRegister , 'builder.bundleConfig' ) ;
143146 const textureCompressProperty = findProperty ( textureCompressNode , 'builder.textureCompressConfig' ) ;
144- const bundleConfigProperty = findProperty ( bundleConfigNode , 'builder.bundleConfig' ) ;
147+ const bundleConfigProperty = findProperty ( bundleConfigNode , 'builder.bundleConfig.custom ' ) ;
145148
146149 expect ( findNode ( beforePlatformRegister , 'builder.common' ) ) . toBeDefined ( ) ;
147150 expect ( findNode ( beforePlatformRegister , 'builder.useCacheConfig' ) ) . toBeDefined ( ) ;
148151 expect ( textureCompressProperty . type ) . toBe ( 'object' ) ;
149152 expect ( textureCompressProperty . default ) . toEqual ( runtime . builderConfig . getDefaultConfig ( ) . textureCompressConfig ) ;
150153 expect ( textureCompressProperty . properties ) . toBeUndefined ( ) ;
154+ expect ( bundleConfigNode . properties [ 'builder.bundleConfig' ] ) . toBeUndefined ( ) ;
151155 expect ( bundleConfigProperty . type ) . toBe ( 'object' ) ;
152- expect ( bundleConfigProperty . default ) . toEqual ( runtime . builderConfig . getDefaultConfig ( ) . bundleConfig ) ;
156+ expect ( bundleConfigProperty . default ) . toEqual ( {
157+ default : runtime . DefaultBundleConfig ,
158+ ...runtime . builderConfig . getDefaultConfig ( ) . bundleConfig . custom ,
159+ } ) ;
153160 expect ( bundleConfigProperty . properties ) . toBeUndefined ( ) ;
154161 expect ( tryFindNode ( beforePlatformRegister , 'builder.platforms.web-mobile' ) ) . toBeUndefined ( ) ;
155162
0 commit comments