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

Feature Request: remove linaria import when using the Babel plugin #293

Closed
chrisbateman opened this issue Jan 11, 2019 · 3 comments
Closed
Labels
enhancement: approved ✅ Improvement of the current behaviour that has been approved priority: low 📉 Something nice to have status: up for grabs 🙏 research is done and issue is ready to be grabbed

Comments

@chrisbateman
Copy link

Do you want to request a feature or report a bug?
Feature

This is not a big problem, since we can usually rely on Webpack/Rollup to remove the unused import. But this would allow reusable libraries to make Linaria a devDependency rather than a regular dependency.

What is the current behavior?
Example output JS:

import {css} from 'linaria';
export var red = "rslh4hm";
export var green = "g1xf75vt";

What is the expected behavior?

export var red = "rslh4hm";
export var green = "g1xf75vt";
@satya164 satya164 added the enhancement: proposal 💬 Improvement of current behaviour that needs to be discussed label Jan 11, 2019
@satya164
Copy link
Member

Makes sense. Though if you use any other utilities from linaria (cx and styled), they are actually needed in runtime, so we can only remove the import if you only use css. Maybe it'll be better to use something like babel-plugin-rewrite-require when publishing the library where you rewrite them to some empty local file.

@chrisbateman
Copy link
Author

Yeah, good point. I'm good with whatever y'all want to do!

@jayu
Copy link
Contributor

jayu commented Apr 1, 2020

It's a good idea but for rare use cases. But PRs welcome :)

@jayu jayu added enhancement: approved ✅ Improvement of the current behaviour that has been approved status: up for grabs 🙏 research is done and issue is ready to be grabbed priority: low 📉 Something nice to have and removed enhancement: proposal 💬 Improvement of current behaviour that needs to be discussed labels Apr 1, 2020
@Anber Anber closed this as completed in 9a50c1c Jun 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement: approved ✅ Improvement of the current behaviour that has been approved priority: low 📉 Something nice to have status: up for grabs 🙏 research is done and issue is ready to be grabbed
Projects
None yet
Development

No branches or pull requests

3 participants