Typescript+rollup compilation failed to generate class library declaration file

The problem arises:

I use a rollup-plugin-typescriptplug-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:
Insert picture description here
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-typescriptnot 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:
Insert picture description here

Insert picture description here

3. Remarks:

Mirror address rollup-plugin-typescript2

Guess you like

Origin blog.csdn.net/qq_29722281/article/details/96586890