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

bug: static state causes Rollup: Missing Export in 3.3.1, compiled ok in 3.3.0 and earlier #4462

Closed
3 tasks done
goulu opened this issue Jun 7, 2023 · 4 comments
Closed
3 tasks done
Assignees
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil

Comments

@goulu
Copy link

goulu commented Jun 7, 2023

Prerequisites

Stencil Version

3.3.1 (and 4.0.0.beta)

Current Behavior

After updating 3.31, I suddenly get this build error on a custom component library that compiles in ealier versions :

Rollup: Missing Export 'ScreenTools' is not exported by ./src/components/test/screen-tools/screen-tools.tsx, imported by screen-tools.entry 1: export { ScreenTools as screen_tools } from 'C:/dev/sphere-stencil/src/components/test/screen-tools/screen-tools.tsx'; ^

the component contains a static State
@State() static skin = skins[0];

Expected Behavior

compile ok as before ...

System Info

System: node 19.8.1
    Platform: windows (10.0.19044)
   CPU Model: 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz (16 cpus)
    Compiler: C:\dev\sphere-stencil\node_modules\@stencil\core\compiler\stencil.js
       Build: 1685732213
     Stencil: 3.3.1
  TypeScript: 5.0.4
      Rollup: 2.42.3
      Parse5: 7.1.2
      Sizzle: 2.42.3
      Terser: 5.17.6

Steps to Reproduce

try to compile https://github.com/goulu/rollup-bug331

Code Reproduction URL

https://github.com/goulu/rollup-bug331

Additional Information

@ionitron-bot ionitron-bot bot added the triage label Jun 7, 2023
@goulu goulu changed the title bug: Rollup: Missing Export in 3.3.1, compiled ok in 3.3.0 and earlier bug: static state causes Rollup: Missing Export in 3.3.1, compiled ok in 3.3.0 and earlier Jun 7, 2023
@rwaskiewicz rwaskiewicz self-assigned this Jun 7, 2023
@rwaskiewicz rwaskiewicz added the Bug: Validated This PR or Issue is verified to be a bug within Stencil label Jun 7, 2023
@ionitron-bot ionitron-bot bot removed the triage label Jun 7, 2023
@rwaskiewicz
Copy link
Contributor

Thanks! I was able to verify the bug - looking into the fix now...

@rwaskiewicz
Copy link
Contributor

@goulu I have a potential fix for this issue in #4463 that I vetted against your reproduction case and one of my own. From that PR's branch, I created a dev build that includes the fix. Can you do me a favor and see if this works for you?

npm i  @stencil/core@3.3.1-dev.1686148224.c9fce88

Thanks!

@goulu
Copy link
Author

goulu commented Jun 9, 2023

npm i @stencil/core@3.3.1-dev.1686148224.c9fce88

yes it works .
Quick and neat :-)

@rwaskiewicz
Copy link
Contributor

The fix for this issue has been officially released as a part of Stencil 3.4.0. Folks running into this issue should update to v3.4.0 at minimum. I'm going to close this out following the release, but please feel free to open a new issue should this reappear. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil
Projects
None yet
Development

No branches or pull requests

2 participants