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: add esbuild integration #765

Merged
merged 2 commits into from Jun 6, 2021
Merged

feat: add esbuild integration #765

merged 2 commits into from Jun 6, 2021

Conversation

Mokshit06
Copy link
Contributor

@Mokshit06 Mokshit06 commented Jun 1, 2021

Motivation

This pull request adds support for esbuild, making bundling code a lot faster.

Summary

This integration works similarly to the rollup integration. It returns a function where the user can pass the configuration and it returns the esbuild plugin. The plugin keeps a cssLookup map and loads all js, jsx, ts, and tsx files and transforms them using esbuild's transform API to transpile ts and jsx to js. It then passes that result to linaria's babel plugin to transform it, extract the CSS file, and add a new entry in the cssLookup. It also appends the CSS file import to the js file and passes it to esbuild's CSS loader.

Test plan

@callstack-bot
Copy link

callstack-bot commented Jun 1, 2021

Hey @Mokshit06, thank you for your pull request 🤗.
The coverage report for this branch can be viewed here.

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

3 participants