File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import * as utils from "../../utils";
1212import { HostingSource , RunRewrite } from "../../firebaseConfig" ;
1313import * as backend from "../functions/backend" ;
1414import { ensureTargeted } from "../../functions/ensureTargeted" ;
15+ import { generateSSRCodebaseId } from "../../frameworks" ;
1516
1617function handlePublicDirectoryFlag ( options : HostingOptions & Options ) : void {
1718 // Allow the public directory to be overridden by the --public flag
@@ -74,6 +75,12 @@ export async function addPinnedFunctionsToOnlyString(
7475 ] ?. [ r . function . functionId ] ;
7576 if ( endpoint ) {
7677 options . only = ensureTargeted ( options . only , endpoint . codebase || "default" , endpoint . id ) ;
78+ } else if ( c . webFramework ) {
79+ options . only = ensureTargeted (
80+ options . only ,
81+ generateSSRCodebaseId ( c . site ) ,
82+ r . function . functionId
83+ ) ;
7784 } else {
7885 // This endpoint is just being added in this push. We don't know what codebase it is.
7986 options . only = ensureTargeted ( options . only , r . function . functionId ) ;
Original file line number Diff line number Diff line change @@ -104,6 +104,14 @@ function memoizeBuild(
104104 return value ;
105105}
106106
107+ /**
108+ * Use a function to ensure the same codebase name is used here and
109+ * during hosting deploy.
110+ */
111+ export function generateSSRCodebaseId ( site : string ) {
112+ return `firebase-frameworks-${ site } ` ;
113+ }
114+
107115/**
108116 *
109117 */
@@ -330,7 +338,7 @@ export async function prepareFrameworks(
330338 ) ;
331339 }
332340
333- const codebase = `firebase-frameworks- ${ site } ` ;
341+ const codebase = generateSSRCodebaseId ( site ) ;
334342 const existingFunctionsConfig = options . config . get ( "functions" )
335343 ? [ ] . concat ( options . config . get ( "functions" ) )
336344 : [ ] ;
You can’t perform that action at this time.
0 commit comments