Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(nuxt): normalize manifest css file entries #6112

Merged
merged 5 commits into from
Jul 25, 2022
Merged

fix(nuxt): normalize manifest css file entries #6112

merged 5 commits into from
Jul 25, 2022

Conversation

ThomasRalee
Copy link
Contributor

@ThomasRalee ThomasRalee commented Jul 25, 2022

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Update mapping logic on clientManifest files to segregate .css files from .js files.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Reproduction

  • Stackblitz reproduction link, CSS is not loaded properly.
  • Command to reproduce: yarn generate && yarn preview

image

@netlify
Copy link

netlify bot commented Jul 25, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit d70974e
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/62de8581e38516000839aac7

@pi0
Copy link
Member

pi0 commented Jul 25, 2022

Thanks for the PR @ThomasRalee. Would you please revert your changes to package.json and playground and provide a reproduction? the linked issue seems not relevant.

@ThomasRalee
Copy link
Contributor Author

Hi @pi0, thanks for the fast reply!

I've reverted the changes to package.json and playground, not sure how to create a reproduction. Would you mind sharing some tips on that?

@pi0
Copy link
Member

pi0 commented Jul 25, 2022

You can fork this sandbox to add broken usecase that this pull request tries to fix. When provided, it would be nice to also include it to basic fixture (https://github.com/nuxt/framework/tree/main/test/fixtures/basic) to avoid future regressions with it.

@ThomasRalee
Copy link
Contributor Author

ThomasRalee commented Jul 25, 2022

Hi @pi0,

Thanks for the tips! I've created a reproduction link here, and also added a simple test to basic fixture, ensuring that the CSS stylesheet link tag is added to HTML head tags.

@pi0 pi0 added the webpack label Jul 25, 2022
@ThomasRalee
Copy link
Contributor Author

ThomasRalee commented Jul 25, 2022

@pi0,

I am getting errors trying to run the webpack and dev fixtures on my local to resolve this 😞 :

  • test:fixtures:dev

image

  • test:fixtures:webpack

image

@pi0
Copy link
Member

pi0 commented Jul 25, 2022

I can locally test on fixture and confirm it works. Building in test environment has strange behavior currently that no scripts are injected at all! Because of that, marked your new test as todo.

@pi0 pi0 changed the title fix: ssr false - css files are being loaded as script module fix(nuxt): normalize manifest css file entries Jul 25, 2022
@pi0 pi0 merged commit 210cf30 into nuxt:main Jul 25, 2022
@pi0 pi0 mentioned this pull request Aug 5, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants