Describe the bug
With suitable imports, it seems that the following code
import '../utils/boot.js'; // boot.js defines window.JSCompiler_renameProperty
....
static get observedAttributes() {
if (!this.hasOwnProperty(JSCompiler_renameProperty('__observedAttributes', this))) {
...
can execute so that observedAttributes is run before the global JSCompiler_renameProperty has been set, resulting in
Uncaught ReferenceError: JSCompiler_renameProperty is not defined
at Function.get observedAttributes [as observedAttributes] (properties-mixin.js:122)
at dom-repeat.js:800
This only happens with some specific imports, as shown in the test case.
Reproduction
git clone https://github.com/Artur-/vite-vaadin-problem1.git
cd vite-vaadin-problem1
npm i
npm run dev
Open localhost:3000 and look at the console output. There should be no errors.
System Info
System:
OS: macOS 11.6
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 290.42 MB / 32.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 16.9.1 - /usr/local/bin/node
Yarn: 1.22.11 - /usr/local/bin/yarn
npm: 7.21.1 - /usr/local/bin/npm
Watchman: 2021.09.13.00 - /usr/local/bin/watchman
Browsers:
Brave Browser: 93.1.29.81
Chrome: 94.0.4606.61
Chrome Canary: 96.0.4656.3
Firefox: 92.0
Safari: 15.0
Safari Technology Preview: 15.4
npmPackages:
vite: ^2.5.4 => 2.6.0
Used Package Manager
npm
Logs
No response
Validations
Describe the bug
With suitable imports, it seems that the following code
can execute so that
observedAttributesis run before the globalJSCompiler_renamePropertyhas been set, resulting inThis only happens with some specific imports, as shown in the test case.
Reproduction
Open localhost:3000 and look at the console output. There should be no errors.
System Info
System: OS: macOS 11.6 CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Memory: 290.42 MB / 32.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 16.9.1 - /usr/local/bin/node Yarn: 1.22.11 - /usr/local/bin/yarn npm: 7.21.1 - /usr/local/bin/npm Watchman: 2021.09.13.00 - /usr/local/bin/watchman Browsers: Brave Browser: 93.1.29.81 Chrome: 94.0.4606.61 Chrome Canary: 96.0.4656.3 Firefox: 92.0 Safari: 15.0 Safari Technology Preview: 15.4 npmPackages: vite: ^2.5.4 => 2.6.0Used Package Manager
npm
Logs
No response
Validations