We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c61313c + 9ed8a54 commit a54748fCopy full SHA for a54748f
src/plugin/index.ts
@@ -6,7 +6,7 @@
6
7
import type { BuildOptions } from "esbuild";
8
import { isEntryFile } from "./babel";
9
-import { RNRBConfig, bundle, escape } from "./bundler";
+import { RNRBConfig, bundle } from "./bundler";
10
import { join } from "path";
11
12
const metroTransformer = (() => {
@@ -42,10 +42,7 @@ export const createTransformer = (
42
const res = await bundle(filename, metroOptions, esbuildOptions);
43
return metroTransformer.transform({
44
...args,
45
- src:
46
- "export default String.raw`" +
47
- escape(res).replace(/\$/g, '\\$') +
48
- "`.replace(/\\\\([`$])/g, '\\$1')",
+ src: "export default " + JSON.stringify(res),
49
});
50
}
51
0 commit comments