Skip to content

Commit f776dd4

Browse files
committed
make it a global regex to replace multiple occurrences
1 parent c859744 commit f776dd4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

scripts/prepare/addon-bundle.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => {
198198
const content = await fs.readFile(file, 'utf-8');
199199
await fs.writeFile(
200200
file,
201-
content.replace(/from \'core\/dist\/(.*)\'/, `from 'storybook/internal/$1'`)
201+
content.replace(/from \'core\/dist\/(.*)\'/g, `from 'storybook/internal/$1'`)
202202
);
203203
})
204204
);

scripts/prepare/bundle.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => {
154154
const content = await fs.readFile(file, 'utf-8');
155155
await fs.writeFile(
156156
file,
157-
content.replace(/from \'core\/dist\/(.*)\'/, `from 'storybook/internal/$1'`)
157+
content.replace(/from \'core\/dist\/(.*)\'/g, `from 'storybook/internal/$1'`)
158158
);
159159
})
160160
);

0 commit comments

Comments
 (0)