The problem arises:
I use a rollup-plugin-typescript
plug-in, integrated into the rollup, trying to compile a class library. At the same time, a declaration file of the class library is generated .d.ts
. Configured tsconfig.json
, according to the instructions on the official file:
However, no matter how I change the path, there is no way to generate class library files. Later, I consulted the front-end god, who told me that the plug-in might be wrong when it was used. The original one is rollup-plugin-typescript
not recommended and must be replaced rollup-plugin-typescript2
. Otherwise, there will be a lot of problems.
2. Problem solving
Reinstall rollup-plugin-typescript2
, according to the above configuration, successfully generate the header file:
3. Remarks:
Mirror address rollup-plugin-typescript2