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

ts lit based app fail after upgrading to 3.1.4 #10409

Closed
7 tasks done
christophe-g opened this issue Oct 10, 2022 · 3 comments
Closed
7 tasks done

ts lit based app fail after upgrading to 3.1.4 #10409

christophe-g opened this issue Oct 10, 2022 · 3 comments

Comments

@christophe-g
Copy link

Describe the bug

Filing this in case other folks stumble on the same issue

Changes introduced in 3.1.4 make lit-based app (written in ts) fail with :

chunk-ZXEQAGIL.js?v=5aae4da4:439 Uncaught (in promise) Error: The following properties on element app-survey 
will not trigger updates as expected because they are set using class fields: disableProminent, prominent, showHelp, 
menu, matchedRoute. Native class fields and some compiled output will overwrite accessors used for detecting changes. 

See https://lit.dev/msg/class-field-shadowing for more information.

even though tsconfig has: "useDefineForClassFields": false

Workaround:

  esbuild: {
    target: 'es2021',
  },

in vite.config.js

Reproduction

https://stackblitz.com/edit/vitejs-vite-q1eiyr?file=index.html

Steps to reproduce

No response

System Info

NA

Used Package Manager

pnpm

Logs

No response

Validations

@sapphi-red
Copy link
Member

even though tsconfig has: "useDefineForClassFields": false

@christophe-g Do you have a reproduction of this one?
It works for me in that condition. https://stackblitz.com/edit/vitejs-vite-mppk5r?file=package.json,tsconfig.json

related: #10296

@christophe-g
Copy link
Author

Thanks a lot @sapphi-red

It works for me in that condition

You are right, it does.

I really don't get what is happening on my locale install. Everything seems to work fine on stackblitz, but running on my machine fail (with same ts.config and vite.config.js, and with "useDefineForClassFields": false).

I'll enquire a bit more and close this issue if I am unable to identify what is coming in the way.

@sapphi-red
Copy link
Member

Closing for now. Feel free to create a new issue if you success to create a reproduction.

@sapphi-red sapphi-red closed this as not planned Won't fix, can't repro, duplicate, stale Oct 30, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants