8000 feat(nuxt): auto-install `@nuxt/webpack-builder` when needed by jeanpierrecarvalho Β· Pull Request #21747 Β· nuxt/nuxt Β· GitHub
[go: up one dir, main page]

Skip to content

feat(nuxt): auto-install @nuxt/webpack-builder when needed #21747

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

Merged

Conversation

jeanpierrecarvalho
Copy link
Contributor

πŸ”— Linked issue

resolves #21746

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 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)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This solves problems related to the webpack builder when the builder options its set to webpack but the module it's not installed.

πŸ“ Checklist

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

@danielroe danielroe changed the title fix(nuxt): add '@nuxt/webpack-builder' module if builder option it's webpack fix(nuxt): auto-install @nuxt/webpack-builder if builder is webpack Jun 24, 2023
@danielroe danielroe added this to the 3.7 milestone Jun 27, 2023
@danielroe
Copy link
Member

We'll aim to get this out for the 3.7 release, next month.

@antfu It looks like this is failing within isPackageExists. resolvePackageJSON from pkg-json seems to work fine. Maybe worth updating the logic or using a mlly utility there?

@antfu
Copy link
Member
antfu commented Jun 27, 2023

I don't mind switching at all. But wonder what cause the failing. Vitest is using it heavily but does seems to have the issue

@danielroe
Copy link
Member

It is using a synchronous CJS-compatible utility only: https://github.com/antfu/local-pkg/blob/main/index.mjs#L70-L84

@antfu
Copy link
Member
antfu commented Jun 27, 2023

Oh yeah, in that case, I guess I might need to rewrite it to make all functions async. For nuxt I think we could directly use unjs packages and not been blocked by it.

@danielroe danielroe changed the title fix(nuxt): auto-install @nuxt/webpack-builder if builder is webpack feat(nuxt): auto-install @nuxt/webpack-builder when needed Jul 30, 2023
@danielroe
Copy link
Member

/trigger release

@github-actions
Copy link
Contributor

πŸš€ Release triggered! You can now install nuxt@npm:nuxt3@pr-21747

@danielroe danielroe merged commit 6200972 into nuxt:main Jul 30, 2023
@danielroe
Copy link
Member

Thank you - this is great.

@github-actions github-actions bot mentioned this pull request Jul 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error running nuxt locally when the builder webpack is enabled in config
3 participants
0