Skip to content

ts lit based app fail after upgrading to 3.1.4 #10409

@christophe-g

Description

@christophe-g

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions