fix(create-medusa-app): fix publishable api key not saving in .env.local (#9328)
This commit is contained in:
1 parent
b3a204e974
commit
5390c8a845
1 file changed
+7
-1
@@ -246,7 +246,13 @@ export default async ({
|
|||||||
|
|
||||||
const originalContent = fs.readFileSync(nextjsEnvPath, "utf-8")
|
const originalContent = fs.readFileSync(nextjsEnvPath, "utf-8")
|
||||||
|
|
||||||
fs.appendFileSync(nextjsEnvPath, originalContent.replace("NEXT_PUBLIC_PUBLISHABLE_KEY=", `NEXT_PUBLIC_PUBLISHABLE_KEY=${apiKeys.rows[0].token}`))
|
fs.writeFileSync(
|
||||||
|
nextjsEnvPath,
|
||||||
|
originalContent.replace(
|
||||||
|
"NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY=pk_test",
|
||||||
|
`NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY=${apiKeys.rows[0].token}`
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user