Quasar CLI with Vite - @quasar/app-vite
使用 Typescript 的 PWA
为了支持使用 Typescript 的 PWA,你需要将 /src-pwa 中文件的扩展名从 .js
重命名为 .ts
,并进行必要的 TS 代码更改。
¥In order to support PWA with Typescript, you will need to rename the extension for your files in /src-pwa from .js
to .ts
and make the necessary TS code changes.
同时创建以下文件:
¥Also create these files:
/* eslint-disable */
declare namespace NodeJS {
interface ProcessEnv {
SERVICE_WORKER_FILE: string;
PWA_FALLBACK_HTML: string;
PWA_SERVICE_WORKER_REGEX: string;
// ...and your own
}
}
content_paste
{
"extends": "../tsconfig.json",
"compilerOptions": {
"lib": ["WebWorker", "ESNext"]
},
"include": ["*.ts", "*.d.ts"]
}
content_paste