forked from vitejs/vite
-
-
Notifications
You must be signed in to change notification settings - Fork 16
Closed
Labels
Description
Describe the bug
I have a SPA built with Vite 7 that I tried upgrading to Vite 8.
See adjacent blog post about it here: https://www.peterbe.com/plog/vite-8-is-5x-faster
However, when starting the dev server, and viewing a component that depends on...
import escapeString from "escape-sql-string"it throws this error:
TypeError: escapeString is not a function
If you console.log it with
import escapeString from "escape-sql-string"
console.log(escapeString)
its output is:
{__esModule: true, default: ƒ}
Reproduction
https://github.com/peterbe/vite8-esape
Steps to reproduce
See https://github.com/peterbe/vite8-esape
clone it and npm install && npm run dev and then open http://localhost:5173/
System Info
System:
OS: macOS 15.7.1
CPU: (12) arm64 Apple M4 Pro
Memory: 359.92 MB / 48.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.19.0 - /Users/peterbengtsson/.local/state/fnm_multishells/67297_1764989798715/bin/node
npm: 10.9.3 - /Users/peterbengtsson/.local/state/fnm_multishells/67297_1764989798715/bin/npm
pnpm: 8.15.9 - /Users/peterbengtsson/Library/pnpm/pnpm
bun: 1.3.3 - /Users/peterbengtsson/.bun/bin/bun
Browsers:
Chrome: 142.0.7444.176
Firefox: 144.0.2
Safari: 18.6
npmPackages:
@vitejs/plugin-react: ^5.1.1 => 5.1.1
rolldown-vite: 7.2.5Used Package Manager
npm
Logs
My real project where I encountered this is I use Bun. But I used npm create vite@latest to create an absolute minimal thing that encounters the bug.
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs and the Rolldown-related guide.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.