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
{{ message }}
Repository navigation
ReferenceError: require2 is not defined when building project with less using vite build() via tsx-cli #20600
When running the Vite build() API inside a script executed via tsx-cli, and the project contains .less files, the build process throws the following error:
ReferenceError: require2 is not defined
at eval (eval at FakeWorker (C:\Users\I2288773\Workspace\MyPledge\build-test\node_modules\.pnpm\rolldown-vite@7.1.1_@types+_483053de22fda570198728257ed16612\node_modules\rolldown-vite\dist\node\chunks\dep-BBmQs1ZR.js:49:835), <anonymous>:5:32)
at eval (eval at FakeWorker (C:\Users\I2288773\Workspace\MyPledge\build-test\node_modules\.pnpm\rolldown-vite@7.1.1_@types+_483053de22fda570198728257ed16612\node_modules\rolldown-vite\dist\node\chunks\dep-BBmQs1ZR.js:49:835), <anonymous>:5:1274)
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 vuejs/core instead.
Activity