Skip to content

Commit

Permalink
Merge pull request #30137 from storybookjs/valentin/escape-apostrophe…
Browse files Browse the repository at this point in the history
…-in-manager-import

Manager: Escape single quotes in dynamic import paths in wrapManagerEntries function
  • Loading branch information
valentinpalkovic authored Dec 24, 2024
2 parents 44e789c + d65dcd0 commit 2c40552
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/core/src/builder-manager/utils/managerEntries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ export async function wrapManagerEntries(entrypoints: string[], uniqueId?: strin
const directory = dirname(location);
await mkdir(directory, { recursive: true });
}
await writeFile(location, `import '${slash(entry)}';`);

await writeFile(location, `import '${slash(entry).replaceAll(/'/g, "\\'")}';`);

return location;
})
Expand Down

0 comments on commit 2c40552

Please sign in to comment.