Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

143
Views
How to export enums from rollup project

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.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!