vue 3.4.18 (since 3.4.16) with vite 5.1.1 and rollup-typescript-plugin2 (ui-kit) build error
Vue version
3.4.18
Link to minimal reproduction
Steps to reproduce
- Clone repository
- npm install
- npm run build
If I downgrade vue version to 3.4.15, it's okay, but not after upgrade to 3.4.16 or later (3.4.18)
System Info
System:
OS: macOS 14.3
CPU: (8) arm64 Apple M1
Memory: 47.88 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.5.1 - ~/.nvm/versions/node/v20.5.1/bin/node
npm: 9.8.0 - ~/.nvm/versions/node/v20.5.1/bin/npm
Browsers:
Chrome: 121.0.6167.160
Safari: 17.3
npmPackages:
vue: 3.4.18 => 3.4.18
Any additional comments?
No response
There's nothing in this report that would allow us to investigate the cause of the problem. Please provide us with a reproduction.
There's nothing in this report that would allow us to investigate the cause of the problem. Please provide us with a reproduction.
@LinusBorg Okay, I agree, I created minimal reproduction https://github.com/nestle49/minimalReproduction
I get build error after upgrade vue version to 3.4.16 or later
Steps to reproduce Clone repository npm install npm run build
If I downgrade vue version to 3.4.15, it's okay, but not after upgrade to 3.4.16 or later (3.4.18)
Traced this down to the dependency update commit https://github.com/vuejs/core/pull/10175
Root cause is the upgrade of lru-cache
from 10.1.0 to 10.2.0 included this change which causes the result of calling Object.prototype.toString
on the parseCache
export of compiler-sfc
has changed.
rollup-plugin-typescript2
uses object-hash to hash options, which somehow encounters the new LRUCache class and throws because the string type has changed to something it does not support.
It's a bit unfortunate that a seemingly harmless bump can cause issues like this. I think it's better to pin lru-cache
considering we are only using the Map
compatible interface and don't expect the implementation to change.