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

feat(babel): async resolvers (fixes #888 and a lot of more) #1001

Merged
merged 1 commit into from Jul 13, 2022
Merged

Conversation

Anber
Copy link
Collaborator

@Anber Anber commented Jul 12, 2022

Motivation

From the beginning, Linaria worked in synchronous mode. That was the reason, why we could not directly support resolvers provided by bundlers (because all of them are async).

Summary

This PR introduces a completely new Linaria, that was rewritten from scratch in order to support async mode. Now Linaria natively supports Rollup, Vite, esbuild and webpack. You don't even need to configure babel-plugin-module-resolver for aliases if your bundler already supports them. Such a big change means, that it can not be released under 3.0 branch. It also means, that the first beta of 4.0 will be pretty unstable, but only during the build stage. If your project is successfully built under 4.0, everything will be fine in production.

Test plan

A lot of new tests were written. Examples for Rollup, Vite, esbuild and webpack 4/5 were added.

@Anber
Copy link
Collaborator Author

Anber commented Jul 12, 2022

@jpnelson I'm going to bring back libResolver option under the new name and a slightly different logic. https://github.com/callstack/linaria/pull/1001/files#diff-58f184d7415a8c22e56e4908527cfd1c7c28ea1c5720cf4280b2d511b25f7409R80 Is it ok for you?

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.

None yet

1 participant