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: if build with compilerOptions.target = "es2022", SSR ignores Props #6095

Closed
3 tasks done
Jagget opened this issue Jan 15, 2025 · 0 comments · Fixed by #6099
Closed
3 tasks done

bug: if build with compilerOptions.target = "es2022", SSR ignores Props #6095

Jagget opened this issue Jan 15, 2025 · 0 comments · Fixed by #6099
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil Help Wanted

Comments

@Jagget
Copy link
Contributor

Jagget commented Jan 15, 2025

Prerequisites

Stencil Version

4.23.1+

Current Behavior

For Stencil 4.23.1+ if tsconfig set for es2022 target

{
  "compilerOptions": {
    "target": "es2022"
  }
}

renderToString() function will ignore properties and will render default SSR string.

Expected Behavior

renderToString() function should honor properties and should render SSR string with proper changes.

System Info

System: node 22.13.0
    Platform: darwin (23.6.0)
   CPU Model: Apple M2 Pro (12 cpus)
    Compiler: /.../node_modules/@stencil/core/compiler/stencil.js
       Build: 1736548319
     Stencil: 4.23.2 🌮
  TypeScript: 5.5.4
      Rollup: 2.56.3
      Parse5: 7.1.2
      jQuery: 4.0.0-pre
      Terser: 5.31.1

Steps to Reproduce

First, when you open the link, it'll install 4.23.0, which is good, run

$ npm run build && npm run express

and you'll see the working SSR.
Then stop it and run

$ npm update 
$ npm run build && npm run express

it'll install 4.32.2, but the change is introduced in 4.23.1. anyway, you'll see the wrong SSR, that ignores Props.

Code Reproduction URL

https://stackblitz.com/edit/stencil-start-afh6bqef?file=src%2Fcomponents%2Ffunctional-svg-hydration.tsx

Additional Information

With tsconfig.json

{
  "compilerOptions": {
    "target": "es2017"
  }
}

the renderToString() function works as expected

@ionitron-bot ionitron-bot bot added the triage label Jan 15, 2025
@christian-bromann christian-bromann added Bug: Validated This PR or Issue is verified to be a bug within Stencil Help Wanted and removed triage labels Jan 15, 2025
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 Help Wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants