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(webpack,rspack): incorrect assumption about the current working directory in webpack and rspack #374

Merged
merged 2 commits into from
Mar 29, 2024

Conversation

NullVoxPopuli
Copy link
Contributor

@NullVoxPopuli NullVoxPopuli commented Mar 15, 2024

πŸ”— Linked issue

#375

❓ 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

Build tools can decide to resolve from wherever they want, and it's not guaranteed that the place they resolve from is the user's current working directory.

For example this reproduction of the failure case where in embroider (which uses a node_modules/.embroider/ directory for the root -- and I imagine svelte apps, too with their .svelte directory)
embroider-build/embroider#1843
Repro here: https://github.com/NullVoxPopuli/embroider-3--unplugin-plugin-loads-app-files

Here is a patched version of unplugin which allows the build to succeed: NullVoxPopuli/embroider-3--unplugin-plugin-loads-app-files#1

πŸ“ Checklist

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

@NullVoxPopuli NullVoxPopuli marked this pull request as ready for review March 15, 2024 16:38
@antfu antfu changed the title [fix] incorrect assumption about the current working directory in webpack and rspack fix(webpack,rspack): incorrect assumption about the current working directory in webpack and rspack Mar 28, 2024
@antfu antfu merged commit b0ec0e0 into unjs:main Mar 29, 2024
10 checks passed
@NullVoxPopuli NullVoxPopuli deleted the use-correct-path branch March 29, 2024 13:36
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