Skip to content

Commit

Permalink
Merge pull request #26676 from storybookjs/valentin/fix-webpack-react…
Browse files Browse the repository at this point in the history
…-docgen-sourcemap-generation

Webpack: Fix sourcemap generation in webpack react-docgen-loader
(cherry picked from commit eba6ed9)
  • Loading branch information
valentinpalkovic authored and storybook-bot committed Apr 3, 2024
1 parent a5abaa9 commit 39a7c68
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ export default async function reactDocgenLoader(
}
});

const map = magicString.generateMap({ hires: true });
const map = magicString.generateMap({
includeContent: true,
source: this.resourcePath,
});
callback(null, magicString.toString(), map);
} catch (error: any) {
if (error.code === ERROR_CODES.MISSING_DEFINITION) {
Expand Down

0 comments on commit 39a7c68

Please sign in to comment.