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): apply a webpack tweak for storybook and angular #8392

Merged
merged 2 commits into from Jan 6, 2022
Merged

fix(storybook): apply a webpack tweak for storybook and angular #8392

merged 2 commits into from Jan 6, 2022

Conversation

rfprod
Copy link
Contributor

@rfprod rfprod commented Jan 5, 2022

  • remove html raw-loader from the webpack rules array if storybook is used with angular v13;
  • update related unit test snapshots;

the html raw-loader breaks jit compilation when storybook 6.5 aplha is used with angular v13

ISSUES CLOSED: #8360

Current Behavior

Expected Behavior

Related Issue(s)

Fixes #8360

@vercel
Copy link

vercel bot commented Jan 5, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nrwl/nx-dev/Etc3UExBiFxtHP7jpmLymbww7aAW
✅ Preview: Canceled

[Deployment for 79ed1d9 canceled]

@rfprod
Copy link
Contributor Author

rfprod commented Jan 5, 2022

@mandarini review please. Please let me know if I modified the correct file, and if I should make any other changes.

PS: Unit tests are failing. I'll run tests locally, and will convert the PR to ready for review once it passes.
PPS: Ok, I should have used --update-snapshot. Unit tests should pass now.
PPPS: Unit tests succeeded.

@rfprod rfprod marked this pull request as draft January 5, 2022 16:41
- [x] remove html raw-loader from the webpack rules array if storybook is used with angular v13;

the html raw-loader breaks jit compilation when storybook 6.5 aplha is used with angular v13

ISSUES CLOSED: #8360

fix(testing): update storybook generator configuration snapshot

fix(testing): update storybook generator configuration snapshot, use the flag --update-snapshot

fix(testing): update storybook generator configuration snapshot, test affected, update snapshot
@rfprod rfprod marked this pull request as ready for review January 5, 2022 17:34
@mandarini
Copy link
Member

mandarini commented Jan 5, 2022

Thank you for this PR @rfprod !
I will test this first thing in the morning tomorrow, and if it works as expected, I'll go ahead and approve. Please see my comment below, it's minor! :)

Thank you so much for contributing to Nx!!!

Comment on lines 29 to 39
* Remove html raw loader that breaks Jit compilation as suggested here https://github.com/storybookjs/storybook/issues/16977#issuecomment-1004059631.
* The issue references:
* - https://github.com/storybookjs/storybook/issues/16977#issuecomment-1003399336
* - https://github.com/storybookjs/storybook/issues/16977#issuecomment-1004180729
* Here's what should be removed:
* {
* test: /\.html$/,
* loader: './node_modules/raw-loader/dist/cjs.js',
* exclude: /\.async\.html$/
* },
*/
Copy link
Member

Choose a reason for hiding this comment

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

Do you think we could make this comment smaller, or maybe remove the github issue references/links, and just keep the explanation? (the Jit breaking, and what needs to be removed for example)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I will remove it in a while once I'm around my laptop.

Copy link
Member

Choose a reason for hiding this comment

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

Sure, no rush! I'll take a look tomorrow my morning in any case! :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mandarini I made the change you requested.

@mandarini mandarini self-assigned this Jan 5, 2022
@mandarini
Copy link
Member

Works like a charm, thank you!

@mandarini mandarini merged commit 77529a1 into nrwl:master Jan 6, 2022
@rfprod rfprod deleted the storybook-webpack-tweak branch January 6, 2022 13:29
mandarini added a commit that referenced this pull request Jan 12, 2022
mandarini added a commit that referenced this pull request Jan 12, 2022
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nx Version 13 not working with Storybook
2 participants