Skip to content

Commit a94980b

Browse files
Merge branch 'main' into federation
# Conflicts: # pnpm-lock.yaml # src/index.ts # src/modify-browser-manifest.ts # src/server-utils.ts
2 parents fb6acf0 + 2420e5f commit a94980b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/modify-browser-manifest.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { Route, PluginOptions } from './types.js';
22
import type { Rspack } from '@rsbuild/core';
33
import { getReactRouterManifestForDev } from './manifest.js';
4+
import jsesc from 'jsesc';
45

56
/**
67
* Creates a Webpack/Rspack plugin that modifies the browser manifest
@@ -34,7 +35,7 @@ export function createModifyBrowserManifestPlugin(
3435
.toString();
3536
const newSource = originalSource.replace(
3637
/["'`]PLACEHOLDER["'`]/,
37-
JSON.stringify(manifest)
38+
jsesc(manifest, { es6: true })
3839
);
3940
compilation.assets[manifestPath] = {
4041
source: () => newSource,

0 commit comments

Comments
 (0)