diff --git a/code/presets/react-webpack/src/loaders/react-docgen-loader.ts b/code/presets/react-webpack/src/loaders/react-docgen-loader.ts index 15b71f19bfd5..ac83e37982de 100644 --- a/code/presets/react-webpack/src/loaders/react-docgen-loader.ts +++ b/code/presets/react-webpack/src/loaders/react-docgen-loader.ts @@ -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) {