Reproduction link
No response
Bug description
If tsconfig.json is set to CommonJS mode, the declaration files for almost modules cannot be read.
tsconfig.json:
{
"compilerOptions": {
"module": "CommonJS",
"moduleResolution": "Node10",
"strict": true
}
}
test.ts:

The cause is probably that the types is not set in package.json.
"main": "dist/index.cjs",
"module": "dist/index.mjs",
+ "types": "dist/index.d.ts",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
},
"require": {
"default": "./dist/index.cjs"
}
}
},
Actual Behavior
No response
Expected Behavior
No response
Can you reproduce it with npx @csstools/csstools-cli <plugin-name> minimal-example.css?
None
npx Output
No response
Extra config
No response
What plugin are you experiencing this issue on?
No response
Plugin version
What OS are you experiencing this on?
No response
Node Version
20
Validations
Would you like to open a PR for this bug?
Reproduction link
No response
Bug description
If
tsconfig.jsonis set to CommonJS mode, the declaration files for almost modules cannot be read.tsconfig.json:test.ts:The cause is probably that the
typesis not set inpackage.json."main": "dist/index.cjs", "module": "dist/index.mjs", + "types": "dist/index.d.ts", "exports": { ".": { "import": { "types": "./dist/index.d.ts", "default": "./dist/index.mjs" }, "require": { "default": "./dist/index.cjs" } } },Actual Behavior
No response
Expected Behavior
No response
Can you reproduce it with
npx @csstools/csstools-cli <plugin-name> minimal-example.css?None
npxOutputNo response
Extra config
No response
What plugin are you experiencing this issue on?
No response
Plugin version
What OS are you experiencing this on?
No response
Node Version
20
Validations
Would you like to open a PR for this bug?