Skip to content

Conversation

@johnjenkins
Copy link
Contributor

@johnjenkins johnjenkins commented Jan 26, 2026

The auto-generated package.json that Stencil inserted within the hydrate dir is too prescriptive and overrides user's main pacakage.json settings.

What is the current behavior?

The auto-generated package.json looks something like:

{
  "name": "your-project/hydrate",
  "description": "YourProject component hydration app.",
  "main": "index.js",
  "types": "index.d.ts",
  "exports": {
    ".": {
      "require": "./index.js",
      "import": "./index.mjs"
    }
  }
}

Which can overrule settings within developers' main package.json

What is the new behavior?

The contents of package.json has been changed to {"type":"commonjs"}; the bear minimum to not cause a breaking change

Documentation

Does this introduce a breaking change?

  • Yes
  • No

Testing

Other information

@johnjenkins johnjenkins requested a review from a team as a code owner January 26, 2026 17:00
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

Successfully merging this pull request may close these issues.

2 participants