I have a package from where I am exporting enums Animation.ts
enum AnimationType {
FADEIN = 'fadein',
FADEOUT = 'fadeout',
BLINK = 'blink',
SHAKE = 'shake',
WIGGLE = 'wiggle',
}
export {AnimationType};
This is my rollup config file
export default [
{
input: "src/index.ts",
output: [
{
file: packageJson.main,
format: "cjs",
sourcemap: false,
},
{
file: packageJson.module,
format: "esm",
sourcemap: false,
},
],
plugins: [
resolve(),
commonjs(),
json({compact: true}),
typescript({ tsconfig: "./tsconfig.json" }),
filesize(),
postcss({
writeDefinitions: true,
plugins:[autoprefixer],
})
],
},
{
input: "dist/esm/types/index.d.ts",
output: [{ file: "dist/index.d.ts", format: "esm" }],
plugins: [dts()],
},
];
I am exporting it as a package but I am not able to import enums. I am getting this error when importing Module has no exported member 'AnimationType'.ts(2305)
How to resolve this error.