Alias declaration for app-vite #12963
Answered
by
rstoenescu
fprijate
asked this question in
CLI - Electron mode
-
For Quasar with webpack (Electron mode) I defined some aliases
What is the right way to define them in Vite project.
How do I define aliases for Electron |
Beta Was this translation helpful? Give feedback.
Answered by
rstoenescu
Mar 29, 2022
Replies: 1 comment 3 replies
-
The Main and Preload threads are not passing through Vite. They are compiled by Esbuild. Unfortunately, Esbuild does not have a direct "alias" feature, but you could use "define" instead? https://quasar.dev/quasar-cli-vite/developing-electron-apps/configuring-electron // quasar.config.js
electron: {
extendElectronMainConf (cfg) {
// do something with Esbuild config
// for the Electron Main thread
},
extendElectronPreloadConf (cfg) {
// do something with Esbuild config
// for the Electron Preload thread
}
} |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
rstoenescu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The Main and Preload threads are not passing through Vite. They are compiled by Esbuild. Unfortunately, Esbuild does not have a direct "alias" feature, but you could use "define" instead?
https://quasar.dev/quasar-cli-vite/developing-electron-apps/configuring-electron