Closed LarsArtmann closed 9 months ago
Removing
"main": "dist/client.cjsx",
in package.json
made the warning disappear.
I think this could go two ways:
.cjsx
and .mjsx
as valid extensions and parse CJS and ESM respectively. (Currently publint doesn't recognize the x
variant).cjsx
and .mjsx
(Because TypeScript don't support it either: https://github.com/microsoft/TypeScript/issues/44442)I'm not really sure which you're implying 😅 But my hunch tells me to go with no2, because AFAIA there's isn't an environment that supports .cjsx
and .mjsx
? But I could be wrong. Any bundler that supports .jsx
today can already make it interop in either CJS and ESM environments. There's also a historical use of .cjsx
to mean the CoffeeScript flavour of JSX.
Thank you @bluwy the article (https://github.com/microsoft/TypeScript/issues/44442) is helpfull.
I think this could go two ways:
- Acknowledging
.cjsx
and.mjsx
as valid extensions and parse CJS and ESM respectively. (Currently publint doesn't recognize thex
variant)- Forbid
.cjsx
and.mjsx
(Because TypeScript don't support it either: Design Meeting Notes, 6/4/2021 microsoft/TypeScript#44442)I'm not really sure which you're implying 😅 But my hunch tells me to go with no2, because AFAIA there's isn't an environment that supports
.cjsx
and.mjsx
? But I could be wrong. Any bundler that supports.jsx
today can already make it interop in either CJS and ESM environments. There's also a historical use of.cjsx
to mean the CoffeeScript flavour of JSX.
Maybe we should implement a better error message?
Yeah we need a better error message here. I think I'll go with no2 to fix this.
Unexpected error after running
build
frompackage.json
package.json