Skip to content

Commit

Permalink
make it a global regex to replace multiple occurrences
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Jul 10, 2024
1 parent c859744 commit f776dd4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/prepare/addon-bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => {
const content = await fs.readFile(file, 'utf-8');
await fs.writeFile(
file,
content.replace(/from \'core\/dist\/(.*)\'/, `from 'storybook/internal/$1'`)
content.replace(/from \'core\/dist\/(.*)\'/g, `from 'storybook/internal/$1'`)
);
})
);
Expand Down
2 changes: 1 addition & 1 deletion scripts/prepare/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => {
const content = await fs.readFile(file, 'utf-8');
await fs.writeFile(
file,
content.replace(/from \'core\/dist\/(.*)\'/, `from 'storybook/internal/$1'`)
content.replace(/from \'core\/dist\/(.*)\'/g, `from 'storybook/internal/$1'`)
);
})
);
Expand Down

0 comments on commit f776dd4

Please sign in to comment.