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

Add support for file only imports #106

Open
1 task done
Indeedornot opened this issue Mar 10, 2024 · 0 comments
Open
1 task done

Add support for file only imports #106

Indeedornot opened this issue Mar 10, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Indeedornot
Copy link

Indeedornot commented Mar 10, 2024

Describe the feature

Currently the way to add imports is using mod.imports.$add, which requires an ImportItemInput which requires an imported parameter, whereas it does not allow for generating such expression like
import 'my-global-styles.css'
On giving null or undefined as imported there is an error thrown

In my case it's particularly important for using AST to export custom css-in-jsx styles outside of file

image
image
image

I could take a look at it when pointed what would be the best way to modify it, and whether it's magicast or recast

Additional information

  • Would you be willing to help implement this feature?
@manniL manniL added the enhancement New feature or request label Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants