Conversation
Since 36aa3ee (perf: prefer to use native magic-string) the transform handler returns after the locale transform whenever `defaultLocale` is set. `transformDefaultLocale` only acts on the `use-locale` module and is a no-op for every other id, but the early return still skips `transformStyle`, so no component style import is injected at all. Only take the locale branch for the locale module itself and fall through to the style transform for everything else, as 0.10.0 did.
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.
Fixes #277
Since 36aa3ee the transform handler returns after the locale transform whenever
defaultLocaleis set.transformDefaultLocaleis a no-op for every id except theuse-localemodule, but the early return still skipstransformStyle, so no component style import is injected at all.This PR only takes the locale branch for the locale module itself and falls through to the style transform for everything else, matching the 0.10.0 behaviour. Adds a test that builds the
basic.tsfixture withuseSource: true, defaultLocale: 'de'and asserts the button and col style imports are present; it fails onmainand passes with the fix.