We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fb6acf0 + 2420e5f commit a94980bCopy full SHA for a94980b
src/modify-browser-manifest.ts
@@ -1,6 +1,7 @@
1
import type { Route, PluginOptions } from './types.js';
2
import type { Rspack } from '@rsbuild/core';
3
import { getReactRouterManifestForDev } from './manifest.js';
4
+import jsesc from 'jsesc';
5
6
/**
7
* Creates a Webpack/Rspack plugin that modifies the browser manifest
@@ -34,7 +35,7 @@ export function createModifyBrowserManifestPlugin(
34
35
.toString();
36
const newSource = originalSource.replace(
37
/["'`]PLACEHOLDER["'`]/,
- JSON.stringify(manifest)
38
+ jsesc(manifest, { es6: true })
39
);
40
compilation.assets[manifestPath] = {
41
source: () => newSource,
0 commit comments