Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lack of support for const enum in typescript #463

Closed
cortopy opened this issue Jun 19, 2020 · 2 comments
Closed

Lack of support for const enum in typescript #463

cortopy opened this issue Jun 19, 2020 · 2 comments

Comments

@cortopy
Copy link

cortopy commented Jun 19, 2020

  • Rollup Plugin Name: typescript
  • Rollup Plugin Version: 4.1.2
  • Rollup Version: 2.17.1
  • Operating System (or Browser): Linux
  • Node Version: 12

How Do We Reproduce?

In a ts file, I have an enum like this:

export const enum PATH {
  ABOUT = "/about",
  CATALOGUE = "/books",
  // ....
}

I've been using @rollup/plugin-typescript version 2.17.1 until today and it was working fine.

However, when I just tried to upgrade to 4.1.2, I get the following error:

Error: 'PATH' is not exported by src/lib/navRoutes.ts, imported by src/components/atoms/icon/NavIcon.svelte

The weird thing is that if I convert the enum to a normal object, it works. I've tested it with other enums and I have the same result

Expected Behavior

The build succeeds

Actual Behavior

Typescript build fails

@shellscape
Copy link
Collaborator

Thanks for opening an issue. Citing the issue template:

Issues without minimal reproductions will be closed! Please provide one by:

  1. Using the REPL.it plugin reproduction template at https://repl.it/@rollup/rollup-plugin-repro
  2. Provide a minimal repository link (Read https://git.io/fNzHA for instructions).
    These may take more time to triage than the other options.
  3. Using the REPL at https://rollupjs.org/repl/

Please add a reproduction and we'll be happy to triage further.

@rollup rollup deleted a comment from ShaMan123 Aug 27, 2022
@ShaMan123
Copy link

ShaMan123 added a commit to fabricjs/fabric.js that referenced this issue Aug 27, 2022
ShaMan123 added a commit to fabricjs/fabric.js that referenced this issue Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants