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
is this code, filename resolves to realpath but the fileName is link path. therefore lead to use defaultLoader to load vite.config.ts which is undefined loader.
so. my fix is use fs.realpathSync to get real fileName dir, and that's work for me.
failed to load config from D:\editor\vite.config.ts
error during build:
TypeError: defaultLoader is not a function
at Object.require.extensions.<computed> [as .ts] (D:\Code\xbguan.ppcw_h5\editor2\node_modules\vite\dist\node\chunks\dep-cc49d7be.js:74775:13)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at loadConfigFromBundledFile (D:\Code\xbguan.ppcw_h5\editor2\node_modules\vite\dist\node\chunks\dep-cc49d7be.js:74780:17)
at loadConfigFromFile (D:\Code\xbguan.ppcw_h5\editor2\node_modules\vite\dist\node\chunks\dep-cc49d7be.js:74696:32)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async resolveConfig (D:\Code\xbguan.ppcw_h5\editor2\node_modules\vite\dist\node\chunks\dep-cc49d7be.js:74282:28)
at async doBuild (D:\Code\xbguan.ppcw_h5\editor2\node_modules\vite\dist\node\chunks\dep-cc49d7be.js:50882:20)
error Command failed with exit code 1.
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/vue-next instead.
Describe the bug
Failed to package in the linked directory,Because the configuration file was not successfully loaded.
is this code,
filename
resolves to realpath but thefileName
is link path. therefore lead to use defaultLoader to loadvite.config.ts
which isundefined
loader.so. my fix is use fs.realpathSync to get real
fileName
dir, and that's work for me.Reproduction
System Info
Used Package Manager
yarn
Logs
Validations
The text was updated successfully, but these errors were encountered: