fix: extract webpack resolve.alias from next.config plugins (#177)#196
Open
SeolJaeHyeok wants to merge 3 commits intocloudflare:mainfrom
Open
fix: extract webpack resolve.alias from next.config plugins (#177)#196SeolJaeHyeok wants to merge 3 commits intocloudflare:mainfrom
SeolJaeHyeok wants to merge 3 commits intocloudflare:mainfrom
Conversation
…re#177) Plugins like next-intl's createNextIntlPlugin / withNextIntl add module aliases via webpack.resolve.alias (e.g. "next-intl/config" → the user's i18n/request.ts). Vite never saw these aliases, so next-intl/config resolved to a stub that throws "Couldn't find next-intl config file". Fix: probe config.webpack() with the real project root to extract string-valued aliases, store them in ResolvedNextConfig.webpackAliases, and merge them into Vite's resolve.alias (vinext's own shims take precedence). Also suppresses the spurious "webpack not yet supported" warning when the webpack function was useful for alias extraction.#
Collaborator
|
Thanks for the PR @SeolJaeHyeok! We're looking at this now. |
- Add ecosystem E2E tests verifying SSR works for English and German locales - Add next.config.ts with webpack alias (simulating createNextIntlPlugin) - Update fixture to use 'use client' page component with NextIntlClientProvider - Add 8 unit tests for extractWebpackAliases covering aliases, non-string values, error handling, and resolveNextConfig integration
- Add table of tested libraries with status and notes to README - Update next-intl status in check.ts to reflect current state - Update migration skill compatibility reference - Reference issue cloudflare#202 for createNextIntlPlugin workaround
commit: |
Collaborator
|
Thanks for fixing! Looks like there are still some sharp edges which I documented in #202 biggest of which is you have to have |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
always take precedence)
Fixes #177