跳到主要内容
当前文档已过时

本文档属于旧版 1.0.x 文档,建议使用新版文档

Test PWA Installability

You can now launch the React site locally using your project's existing workflow.

Run the DevServer:

npm run dev

Or run a static web server:

npm run build
npm run preview

Then open the site's local URL in Chrome or Edge. You should see the PWA install button in the address bar of your browser:

Open your browser's DevTools, you should see how the browser has parsed the Web App Manifest for this page.

At this point, the site qualifies as a minimal PWA.

提示

After deploying to production, the site must be served over HTTPS. Otherwise, the browser will not recognize it as a PWA.