-
Notifications
You must be signed in to change notification settings - Fork 61
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
chore: migrate to to wyw-in-js #414
Draft
layershifter
wants to merge
1
commit into
microsoft:main
Choose a base branch
from
layershifter:chore/linaria-v4-2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains 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
📊 Bundle size reportUnchanged fixtures
|
layershifter
force-pushed
the
chore/linaria-v4-2
branch
from
September 25, 2023 12:01
aad3473
to
8ed2a05
Compare
layershifter
changed the title
chore: upgrade to Linaria v4
chore: upgrade to Linaria v5
Sep 25, 2023
layershifter
force-pushed
the
chore/linaria-v4-2
branch
4 times, most recently
from
September 25, 2023 12:34
27a8f05
to
1eeae6b
Compare
layershifter
changed the title
chore: upgrade to Linaria v5
chore: migrate to to wyw-in-js
Dec 8, 2023
layershifter
force-pushed
the
chore/linaria-v4-2
branch
from
December 8, 2023 13:14
1eeae6b
to
8fb9de8
Compare
layershifter
force-pushed
the
chore/linaria-v4-2
branch
from
December 8, 2023 16:44
8fb9de8
to
1f7b76f
Compare
layershifter
added a commit
to layershifter/office-ui-fabric-react
that referenced
this pull request
Dec 11, 2023
Adds `wyw-in-js` field to `package.json` to support styles processing with WyW-in-JS compiler (https://wyw-in-js.dev/). The plan is to use this compiler for Vite/esbuild plugins (microsoft/griffel#41) and later switch our Webpack loader to it (microsoft/griffel#414).
layershifter
added a commit
to microsoft/fluentui
that referenced
this pull request
Dec 15, 2023
) Adds `wyw-in-js` field to `package.json` to support styles processing with WyW-in-JS compiler (https://wyw-in-js.dev/). The plan is to use this compiler for Vite/esbuild plugins (microsoft/griffel#41) and later switch our Webpack loader to it (microsoft/griffel#414).
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.
TODO
Update PR to reflect removal of
@griffel/babel-preset
.Summary
This PR upgrades
@griffel/babel-preset
and@griffel/webpack-loader
to use wyw-in-js. wyw-in-js introduces a concept of processors to handle different CSS-in-JS implementations i.e. "implement your processor (transform) and use existing tooling to run it".The information is obtainer from
package.json
files:👆 indicates Linaria to process
makeStyles
&makeResetStyles
with matching transformsAnother benefit is that Linaria v5 supports async resolving of dependencies that was a blocker for other bundlers (#33).
BREAKING CHANGES
@griffel/babel-preset
modules
&projectRoot
options removed from configs, usepackage.json
to define processors (see Summary ⬆️ )EvalCache
&Module
are not longer exported and should not be used directly anymore@griffel/linaria-processor
installedTODO
@griffel/webpack-loader
modules
&projectRoot
options removed from configs, usepackage.json
to define processors (see Summary ⬆️ )@griffel/linaria-processor
installedDetails
@griffel/babel-preset
All internals of
@griffel/babel-preset
were removed: module evaluation is gone, parts related to assets handling were moved to@griffel/linaria-processor
.error-argument-count
: not needed, check is not longer thereimport-custom-module
: aliases are configured now inpackage.json
filesimport-custom-name
: aliases are configured now inpackage.json
filesnon-existing-module-call
: removed,@linaria/shaker
now works differentlyrequire-custom-module
: removed, not neededUpdated fixtures:
asset
: file paths handled properly, fixes babel-preset: handles relative paths as assets #313config-evaluation-rules
: we don't have own evaluation part anymore, matches to what Linaria doesduplicated-imports
: handles multiple imports as it should be 💪 Fixes babel-preset: multiple modules produce the same import #104@griffel/webpack-loader
All internals of
@griffel/webpack-loader
were removed, now it's just a tiny wrapper around@linaria/webpack-loader
.Following fixtures were removed:
config-modules
: aliases are configured now inpackage.json
fileserror-argument-count
: not needed, check is not longer thereerror-syntax
: not neededNew fixture
react-component
to test a more real life example.TODO
Related issues
Fixes #104.
Fixes #184.
Fixes #313.
TODOs
Pass proper import sources in processors🔴 "export *" prevent shaking and removal of unused code callstack/linaria#1311🔴 BLOCKER Tags parsing is too aggressive callstack/linaria#1214🔴 BLOCKER EvalError: tslib_1.__importStar is not a function callstack/linaria#1209🔴 BLOCKER: TS helpers for imports are not fully handled? callstack/linaria#1186🔴 BLOCKER: feat(tags): introduce tagSource for processors callstack/linaria#1188🔴 BLOCKER: import side-effects are removed callstack/linaria#1189💣 BLOCKER: Circulars dependencies are causing infinite loop callstack/linaria#1193