@@ -53,7 +53,7 @@ describe('laravel-vite-plugin', () => {
5353
5454 const config = plugin . config ( { } , { command : 'build' , mode : 'production' } )
5555 expect ( config . base ) . toBe ( '/other-build/' )
56- expect ( config . build . manifest ) . toBe ( true )
56+ expect ( config . build . manifest ) . toBe ( 'manifest.json' )
5757 expect ( config . build . outDir ) . toBe ( 'other-public/other-build' )
5858 expect ( config . build . rollupOptions . input ) . toBe ( 'resources/js/app.ts' )
5959
@@ -64,6 +64,30 @@ describe('laravel-vite-plugin', () => {
6464 expect ( ssrConfig . build . rollupOptions . input ) . toBe ( 'resources/js/ssr.ts' )
6565 } )
6666
67+ it ( 'respects the users build.manifest config option' , ( ) => {
68+ const plugin = laravel ( {
69+ input : 'resources/js/app.js' ,
70+ } ) [ 0 ]
71+
72+ const userConfig = { build : { manifest : 'my-custom-manifest.json' } }
73+
74+ const config = plugin . config ( userConfig , { command : 'build' , mode : 'production' } )
75+
76+ expect ( config . build . manifest ) . toBe ( 'my-custom-manifest.json' )
77+ } )
78+
79+ it ( 'has a default manifest path' , ( ) => {
80+ const plugin = laravel ( {
81+ input : 'resources/js/app.js' ,
82+ } ) [ 0 ]
83+
84+ const userConfig = { }
85+
86+ const config = plugin . config ( userConfig , { command : 'build' , mode : 'production' } )
87+
88+ expect ( config . build . manifest ) . toBe ( 'manifest.json' )
89+ } )
90+
6791 it ( 'respects users base config option' , ( ) => {
6892 const plugin = laravel ( {
6993 input : 'resources/js/app.ts' ,
@@ -84,7 +108,7 @@ describe('laravel-vite-plugin', () => {
84108
85109 const config = plugin . config ( { } , { command : 'build' , mode : 'production' } )
86110 expect ( config . base ) . toBe ( '/build/' )
87- expect ( config . build . manifest ) . toBe ( true )
111+ expect ( config . build . manifest ) . toBe ( 'manifest.json' )
88112 expect ( config . build . outDir ) . toBe ( 'public/build' )
89113 expect ( config . build . rollupOptions . input ) . toBe ( 'resources/js/app.js' )
90114
0 commit comments