diff --git a/src/plugin/index.ts b/src/plugin/index.ts index 93e56f2..211fd67 100644 --- a/src/plugin/index.ts +++ b/src/plugin/index.ts @@ -44,8 +44,8 @@ export const createTransformer = ( ...args, src: "export default String.raw`" + - escape(res).replace(/\$\{(.*?)\}/g, "\\$\\{$1\\}") + - "`.replace(/\\\\([`${}])/g, '\\$1')", + escape(res).replace(/\$/g, '\\$') + + "`.replace(/\\\\([`$])/g, '\\$1')", }); }