How to ignore lib types check from node modules #225
Answered
by
Swatinem
rahXephonz
asked this question in
Q&A
-
Hello. i've got bunch of error after bundling types from my packages. My rollup config : import typescript from "rollup-plugin-typescript2";
import externals from "rollup-plugin-node-externals";
import dts from "rollup-plugin-dts";
import visualizer from "rollup-plugin-visualizer";
export default [
{
input: ["src/index.ts"],
output: {
dir: "dist",
format: "esm",
sourcemap: true,
},
plugins: [
typescript(),
visualizer({
filename: "bundle-analysis.html",
open: process.env.ANALYZE,
}),
externals({
devDeps: false,
}),
],
preserveModules: true,
external: ["react", "@stylish-ui/core", "styled-system", "styled-components"],
},
{
input: ["src/index.ts"],
output: [{ file: "dist/index.d.ts", format: "es" }],
plugins: [
dts({
compilerOptions: {
baseUrl: "./src",
},
}),
],
},
]; Please any help? |
Beta Was this translation helpful? Give feedback.
Answered by
Swatinem
Oct 9, 2022
Replies: 1 comment 2 replies
-
I believe the problem comes from using |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
rahXephonz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I believe the problem comes from using
.ts
inputs, as that invokes the TS compiler to generate the types. As you already have a previous step with thetypescript
plugin, I believe that can be configured to output type declaration files into some temporary folder.