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: nonjs-resolve plugin #902

Merged
merged 1 commit into from
Sep 26, 2024
Merged

fix: nonjs-resolve plugin #902

merged 1 commit into from
Sep 26, 2024

Conversation

dai-shi
Copy link
Owner

@dai-shi dai-shi commented Sep 26, 2024

there was a huge misunderstanding.

Copy link

vercel bot commented Sep 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
waku ✅ Ready (Inspect) Visit Preview Sep 26, 2024 3:56am

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@@ -7,17 +7,16 @@ export function nonjsResolvePlugin(): Plugin {
return {
name: 'nonjs-resolve-plugin',
async resolveId(id, importer, options) {
if (!id.endsWith('.js')) {
return id;
Copy link
Owner Author

Choose a reason for hiding this comment

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

We shouldn't resolve it because other plugins can't resolve it. We should return undefined.

@dai-shi dai-shi marked this pull request as ready for review September 26, 2024 04:02
@dai-shi dai-shi merged commit 83bf5ee into main Sep 26, 2024
28 checks passed
@dai-shi dai-shi deleted the fix/nonjs-vite-plugin branch September 26, 2024 09:04
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.

1 participant