Skip to content

Commit

Permalink
Vite: Fix sourcemapping for CSF files
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinpalkovic committed May 17, 2024
1 parent 0200052 commit 04378b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/builders/builder-vite/src/plugins/csf-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export async function csfPlugin(config: Options): Promise<Plugin> {
makeTitle,
}).parse();
enrichCsf(csf, csfSource, options);
return formatCsf(csf, { sourceMaps: true });
const inputSourceMap = this.getCombinedSourcemap();
return formatCsf(csf, { sourceMaps: true, inputSourceMap }, code);
} catch (err: any) {
// This can be called on legacy storiesOf files, so just ignore
// those errors. But warn about other errors.
Expand Down

0 comments on commit 04378b7

Please sign in to comment.