Skip to content

mwojtul/vite-plugin-legacy-spread-operator-on-set

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting started

  • run npm install
  • start vite: npm run dev

Reproducing the spread operator on a Set bug

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published