- run
npm install
- start vite:
npm run dev
- in
src/main.js
on line 4, note theconst uniqueValues = [...new Set([1, 1, 2, 3])]
- run
npm run build
- in
dist/assets/index-legacy[hash].js
, inspect the traspiled code:[].concat(new Set([1, 1, 2, 3]))
- the transpiled code evaluates to
[Set(3)]
, but the source code evaluates to[1, 2, 3]
in modern browsers