定制 nowo-tech/pwa-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nowo-tech/pwa-bundle

Composer 安装命令:

composer require nowo-tech/pwa-bundle

包简介

Symfony bundle to turn any application into a fully configurable Progressive Web App (manifest, service worker, offline, install prompt)

README 文档

README

CI codecov Packagist Version Packagist Downloads License PHP Symfony GitHub stars

Found this useful? Give it a star on GitHub so more developers can find it.

Turn any Symfony application into a Progressive Web App with a fully configurable manifest, service worker, offline page, and install prompt — no vendor lock-in, no hardcoded assets.

Features

  • Web App Manifest generated from nowo_pwa.yaml (name, icons, shortcuts, theme, display mode, scope, start URL)
  • Service worker with configurable cache strategy (network-first, cache-first, stale-while-revalidate), precache URLs, and offline fallback
  • Twig helpers nowo_pwa_head(), nowo_pwa_install_prompt(), and nowo_pwa_install_links() with route targeting (all / only / except)
  • Override-friendly Twig templates and translations (en, es, fr, it, pt, de, nl; REQ-TWIG-001 / REQ-I18N-001)
  • TypeScript client for SW registration and install banner (Vite build → pwa.js)
  • Works with Symfony 7.4+ and 8.x; no database required

Installation

composer require nowo-tech/pwa-bundle
# config/packages/nowo_pwa.yaml
nowo_pwa:
    manifest:
        name: 'My Application'
        short_name: MyApp
        theme_color: '#0f172a'
        icons:
            - { src: '/icons/icon-192.png', sizes: '192x192', type: image/png }
            - { src: '/icons/icon-512.png', sizes: '512x512', type: image/png }
    service_worker:
        precache_urls: ['/', '/offline']
        offline_url: '/offline'

In your base layout:

<head>
    {{ nowo_pwa_head() }}
</head>
<body>
    {% block body %}{% endblock %}
    {{ nowo_pwa_install_prompt() }}
    {{ nowo_pwa_install_links() }}
</body>

See Installation and Configuration.

Documentation

Additional documentation

Tests and coverage

make test
make test-ts
make test-coverage
make release-check   # includes demo healthcheck on port 8025

License

MIT — see LICENSE.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-07-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固