Skip to content

Commit

Permalink
remove escape char from regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Lms24 committed May 30, 2023
1 parent 4c93809 commit fd084cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/sveltekit/src/vite/sourceMaps.ts
Expand Up @@ -114,7 +114,7 @@ export async function makeCustomSentryVitePlugin(options?: CustomSentryVitePlugi

transform: async (code, id) => {
let modifiedCode = code;
const isServerHooksFile = new RegExp(`\/${escapeStringForRegex(serverHooksFile)}(\.(js|ts|mjs|mts))?`).test(id);
const isServerHooksFile = new RegExp(`\/${escapeStringForRegex(serverHooksFile)}(.(js|ts|mjs|mts))?`).test(id);

if (isServerHooksFile) {
let injectedCode = `global.__sentry_sveltekit_output_dir = "${outputDir || 'undefined'}";\n`;
Expand Down

0 comments on commit fd084cc

Please sign in to comment.