API 浏览器
Quasar CLI with Webpack - @quasar/app-webpack
使用 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:

/src-pwa/pwa-env.d.ts

/* eslint-disable */

declare namespace NodeJS {
  interface ProcessEnv {
    SERVICE_WORKER_FILE: string;
    PWA_FALLBACK_HTML: string;
    PWA_SERVICE_WORKER_REGEX: string;
    // ...and your own
  }
}
/src-pwa/tsconfig.json

{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "lib": ["WebWorker", "ESNext"]
  },
  "include": ["*.ts", "*.d.ts"]
}