Skip to content

bug: dist/esm/polyfills is empty  #4661

Closed

Description

@AnnaHoege

Prerequisites

Stencil Version

v4.0.4

Current Behavior

When running npm run build, the resulting dist/esm/polyfills folder is empty every other time the command is run. This causes issues as the loader exports the index file of the polyfills folder.

Expected Behavior

The polyfills folder should contain at least an index file on every build.

System Info

System: node 18.17.0
      Platform: windows (10.0.19045)
      CPU Model: Intel(R) Core(TM) i7-10610U CPU @ 1.80GHz (8 cpus)
      Compiler: C:\Users\AHOEGE\Projects\stencil-bug-reproduction\bug-reproduction\node_modules\@stencil\core\compiler\stencil.js
      Build: 1691405536
      Stencil: 4.0.4
      TypeScript: 5.0.4
      Rollup: 2.42.3
      Parse5: 7.1.2
      Sizzle: 2.42.3
      Terser: 5.19.2

Steps to Reproduce

  1. Create a new project via npm init stencil
  2. Run npm i
  3. Run npm build
  4. Run npm build

Code Reproduction URL

https://github.com/AnnaHoege/stencil-bug-reproduction

Additional Information

No response

Activity

  1. alicewriteswrongs commented on Aug 8, 2023

    @alicewriteswrongs
    Contributor

    Hey @AnnaHoege, thanks for filing this issue!

    I wasn't able to reproduce it on macOS, but then I tried out your reproduction in a windows 11 VM and, lo and behold, it does reproduce there, so I think we've got a windows-specific bug on our hands here.

    I'm going to label it to get it ingested into our internal backlog so it can be prioritized and fixed.

  2. added
    Bug: Validated
    on Aug 8, 2023
  3. FirstVertex commented on Sep 12, 2023

    @FirstVertex

    I'm seeing this intermittently on my Windows 11 machine. stencil build completes and the dist folder is generated, there's a polyfills folder under esm/ but it is empty. When I run build again it is fixed.

  4. FirstVertex commented on Sep 15, 2023

    @FirstVertex

    Here is my workaround for now using rimraf and a prebuild step.
    npm i rimraf --save-dev

    In your package.json add a prebuild which will run before stencil build

    "prebuild": "rimraf ./dist/esm/polyfills"

  5. rwaskiewicz commented on Oct 13, 2023

    @rwaskiewicz
    Member

    Can anyone running into this issue please try out this dev build for me and let me know if this works?

    npm i @stencil/[email protected]
    

    Thanks!

  6. imagoiq commented on Oct 16, 2023

    @imagoiq

    Hi,

    Works on my side, the polyfills folder is not empty anymore and contains: core-js.js, dom.js, es5-html-element.js, index.js and system.js.

    Thanks for handling it.

  7. added a commit that references this issue on Oct 16, 2023
    7ef28da
  8. added a commit that references this issue on Oct 16, 2023
    b97dadc
  9. rwaskiewicz commented on Oct 16, 2023

    @rwaskiewicz
    Member

    Starting at ~3AM UTC (tomorrow), the fix for this issue will be a part of the Stencil nightly builds. You can test it out with:

    npm i @stencil/core@nightly
    

    We plan on shipping this fix in our next release of Stencil, which is currently planned for no later than 1 week from today.

  10. rwaskiewicz commented on Oct 23, 2023

    @rwaskiewicz
    Member

    The fix for this issue has been released as a part of today's Stencil v4.6.0 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Bug: Validated

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions