-
Notifications
You must be signed in to change notification settings - Fork 12
Description
We're using less-bundle in a TS package of ours. We're building our package with tsc --build with the following config:
{
"compilerOptions": {
"declarationDir": "./dist",
"emitDeclarationOnly": false,
"module": "CommonJS",
"outDir": "./dist",
"rootDir": "./src",
"target": "ESNext",
"composite": true,
"incremental": true,
"lib": ["DOM", "ESNext"],
"importHelpers": true,
"declarationMap": false,
"declaration": true,
"sourceMap": false,
"strict": true,
"noEmitOnError": true,
"noImplicitAny": true,
"skipLibCheck": true,
"skipDefaultLibCheck": true,
"isolatedModules": true,
"noImplicitThis": true,
"alwaysStrict": true,
"noUnusedLocals": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "Node",
"jsx": "react",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"resolveJsonModule": true
},
"include": ["./src"]
}
When launching the build, we're getting TS errors from less-bundle:

There is a dedicated parameter in TS to ignore libraries TS errors called skipLibCheck. However the way it works is by ignoring all d.ts declaration files.
As there is none produced by less-bundle, and as the entry file of the library is a index.ts file, we're getting those TS errors with no straightforward way of working around them. To be fair, one could also argue that it is a lack of configuration on TS's side.
Anyway, this keeps us from building our package, and blocks us.
In the meantime, to unblock ourselves, we forked your repo and added to it a configuration that would fit to our situation, by generating declaration files from your code.
Is this a problem your planning on solving?
If not, would you like us to open a PR on this repo with the changes we made on the fork?