Skip to content

Allow Specifying File Extensions with --insert-css-requires Option in Linaria's CLI #1326

Description

@digo09

Describe the enhancement

I'm mainly using the CLI as I cannot fully understand and use various build environments. In the CLI options mentioned in Linaria's CLI documentation, it would be even better if we could specify file extensions in addition to directory configurations when using the --insert-css-requires option.

Motivation

It's useful to apply not only to .js files but also .cjs, .mjs, etc., especially when developing libraries or in various environments. I guess the relevant part is around here:

function resolveRequireInsertionFilename(filename: string) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement: proposal 💬Improvement of current behaviour that needs to be discussedneeds: triage 🏷Issue needs to be checked and prioritized

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions