API 浏览器
Quasar CLI with Webpack - @quasar/app-webpack
Electron 与 Typescript 的结合

为了使用 Typescript 支持 Electron,你需要重命名扩展名将 /src-electron 中的文件从 .js 重命名为 .ts,并进行必要的 TS 代码更改。

¥In order to support Electron with Typescript, you will need to rename the extension for your files in /src-electron from .js to .ts and make the necessary TS code changes.

提示

@electron/packagerelectron-builder 从各自的包中导出配置类型。由于 quasar.config 文件中的自动补齐功能依赖于这些类型,因此只有在安装相应的包后,属性 electron.packagerelectron.builder 才会完全输入。你可以通过在 Electron 模式下运行构建命令来强制安装所选的打包器(取决于你的 electron.bundler 选项):quasar build -m electron

¥@electron/packager and electron-builder export their configuration types from their own packages. Since autocomplete into the quasar.config file relies on those types, properties electron.packager and electron.builder will be fully typed only after the respective package is installed. You can force the installation of the selected bundler (depending on your electron.bundler option) by running a build command in Electron mode: quasar build -m electron