File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,13 @@ export default function laravel(config?: string|string[]|Partial<PluginConfig>):
170170 return null
171171 } ,
172172 writeBundle ( ) {
173- const manifestPath = path . resolve ( resolvedConfig . root , resolvedConfig . build . outDir , 'manifest.json' )
173+ const manifestConfig = resolveManifestConfig ( resolvedConfig )
174+
175+ if ( manifestConfig === false ) {
176+ return ;
177+ }
178+
179+ const manifestPath = path . resolve ( resolvedConfig . root , resolvedConfig . build . outDir , manifestConfig )
174180 const manifest = JSON . parse ( fs . readFileSync ( manifestPath ) . toString ( ) )
175181 const newManifest = {
176182 ...manifest ,
@@ -259,3 +265,20 @@ function resolveOutDir(config: PluginConfig, ssr: boolean): string|undefined {
259265
260266 return path . join ( config . publicDirectory , config . buildDirectory )
261267}
268+
269+ function resolveManifestConfig ( config : ResolvedConfig ) : string | false
270+ {
271+ const manifestConfig = config . build . ssr
272+ ? config . build . ssrManifest
273+ : config . build . manifest ;
274+
275+ if ( manifestConfig === false ) {
276+ return false
277+ }
278+
279+ if ( manifestConfig === true ) {
280+ return config . build . ssr ? 'ssr-manifest.json' : 'manifest.json'
281+ }
282+
283+ return manifestConfig
284+ }
You can’t perform that action at this time.
0 commit comments