Skip to content

bug: ReferenceError: _interopNamespace is not defined #6270

@matheus-rosa-jsm

Description

@matheus-rosa-jsm

Prerequisites

Stencil Version

3.28.0+

Current Behavior

After upgrade the version of stencil, from 4.27.1 to 4.32.0, I started to face this error.
CJS build is missing _interopNamespace rollup helper when the config enableImportInjection is settled to true.

Image

Expected Behavior

_interopNamespace present in the helper as was when the version was 4.27.1.

Image

System Info

System: node 18.20.6
Platform: windows (10.0.22631)
CPU Model: Intel(R) Core(TM) Ultra 7 165U (14 cpus)
Build: 1748464182
Stencil: 4.32.0
TypeScript: 5.5.4
Rollup: 4.34.9
Parse5: 7.2.1
jQuery: 4.0.0-pre
Terser: 5.37.0

Steps to Reproduce

I create an next app to use the cjs module, but you can just check the cjs file in the build. To run the project you can:

  • npm i
  • npm run build
  • cd next-app
  • npm i
  • npm run dev

Code Reproduction URL

https://github.com/matheus-rosa-jsm/stencil-bug-reproduction

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug: ValidatedThis PR or Issue is verified to be a bug within StencilHelp Wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions