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) { |
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-requiresoption.Motivation
It's useful to apply not only to
.jsfiles but also.cjs,.mjs, etc., especially when developing libraries or in various environments. I guess the relevant part is around here:linaria/packages/cli/src/linaria.ts
Line 99 in e29a54e