Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(storybook): generate valid source-maps #148

Merged
merged 2 commits into from
Jul 17, 2024

Conversation

DenisVershkov
Copy link
Contributor

No description provided.

@@ -38,6 +38,8 @@ export async function configureServiceWebpackConfig(

return {
...storybookConfig,
// default storybook devtool value is incompatible with CssMinimizerWebpackPlugin
devtool: 'source-map',
Copy link
Collaborator

@ValeraS ValeraS Jul 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's change devtool only in production mode

const devtool = storybookConfig.devtool;
// storybook uses `cheap-module-source-map` and it's incompatible with `CssMinimizerWebpackPlugin`
// also don't change devtool if it's disabled
if (mode === WebpackMode.Production && devtool) {
    devtool = 'source-map';
}

@DenisVershkov DenisVershkov merged commit 91e4dcc into main Jul 17, 2024
2 checks passed
@DenisVershkov DenisVershkov deleted the fix/generate-correct-source-maps branch July 17, 2024 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants