Skip to content

Commit

Permalink
fix: include rewriting for scripts artifact in deploy-url handling (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dhhyi authored Nov 20, 2023
1 parent a48c7ae commit 4304cf2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ssr/deploy-url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export function setDeployUrlInFile(deployUrl: string, path: string, input: strin
newInput = newInput.replace(assetsRegex, (...args) => `"${deployUrl}${args[1]}"`);
}

const javascriptRegex = /"(DEPLOY_URL_PLACEHOLDER|\/)?((runtime|vendor|main|polyfills|styles)[^"]*\.(js|css))"/g;
const javascriptRegex =
/"(DEPLOY_URL_PLACEHOLDER|\/)?((runtime|vendor|main|polyfills|styles|scripts)[^"]*\.(js|css))"/g;
if (javascriptRegex.test(newInput)) {
newInput = newInput.replace(javascriptRegex, (...args) => `"${deployUrl}${args[2]}"`);
}
Expand Down

0 comments on commit 4304cf2

Please sign in to comment.