You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When starting up Vite loading .scss file in main.js has too big "Waiting (TTFB)" time.
Vite starts and then waits something 6-7 seconds (in my case) until loads .scss file. That .scss file from Element UI lib and has many @imports inside. Webpack doesn't have that problem.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
Same problem here, Vite will 502 the first load, I'll wait 30 seconds for sass to compile, and then I can refresh.
Unrelated issue: #2778
The commonJS polyfill interferes with the pseudo ESM module... a fix is to disable commonjs and polyfill the global. This is so bad, it's probably worth forking the whole bad module and fixing it yourself until you can switch or update to modules that export ESM or don't rely on Node globals.
There's not really anything we can do here. There's a lot of SCSS to compile, and the sass package has to take the time to compile. Because Vite only transforms it when requested, you'll see in blocking the network request. Unlike webpack where it bundles in the server side first before it initiates the load.
Describe the bug
When starting up Vite loading .scss file in main.js has too big "Waiting (TTFB)" time.
Vite starts and then waits something 6-7 seconds (in my case) until loads .scss file. That .scss file from Element UI lib and has many @imports inside. Webpack doesn't have that problem.
Reproduction
https://stackblitz.com/edit/vitejs-vite-pgyjv5?file=main.js&terminal=dev
System Info
Used Package Manager
npm
Logs
Validations
The text was updated successfully, but these errors were encountered: