Skip to content

Commit

Permalink
[#133] change replaceAll to replace for NodeJS 14 compatibility (#132)
Browse files Browse the repository at this point in the history
replaceAll is available from Nodejs 15+
But the regex here works also with replace which also guarantees nodejs 14 compatibility
  • Loading branch information
drbeat authored Jan 28, 2024
1 parent 8546dab commit df64f5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ export function buildOutputChunkWithCssInjectionCode(
cssInjectionCode: string,
topExecutionPriorityFlag: boolean
): string {
const appCode = jsAssetCode.replaceAll(/\/\*\s*empty css\s*\*\//g, '');
const appCode = jsAssetCode.replace(/\/\*\s*empty css\s*\*\//g, '');
jsAssetCode = topExecutionPriorityFlag ? '' : appCode;
jsAssetCode += cssInjectionCode;
jsAssetCode += !topExecutionPriorityFlag ? '' : appCode;
Expand Down

0 comments on commit df64f5f

Please sign in to comment.