Skip to content

Add support for file only imports #106

@Indeedornot

Description

@Indeedornot

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions