承接 faysal0x1/service-worker-module 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

faysal0x1/service-worker-module

最新稳定版本:1.0.4

Composer 安装命令:

composer require faysal0x1/service-worker-module

包简介

Reusable service worker + frontend cache module for Laravel (nwidart).

README 文档

README

Reusable nwidart/laravel-modules package that ships:

  • A production-ready sw.js implementation with image/API caching helpers
  • Frontend utilities (resources/js/utils/serviceWorker.js + config helper)
  • Publishable config files (config/service-worker.php, config/frontend-cache.php)
  • Documentation (SERVICE_WORKER_CONFIG.md)

Installation

composer require faysal0x1/service-worker-module
php artisan module:enable ServiceWorker

Publish assets

# Config + docs
php artisan vendor:publish --provider="App\Modules\ServiceWorker\Providers\ServiceWorkerServiceProvider" --tag=serviceworker-config
php artisan vendor:publish --provider="App\Modules\ServiceWorker\Providers\ServiceWorkerServiceProvider" --tag=serviceworker-docs

# Frontend helpers
php artisan vendor:publish --provider="App\Modules\ServiceWorker\Providers\ServiceWorkerServiceProvider" --tag=serviceworker-frontend

# Optional: publish the service worker bootstrap + standalone worker file
php artisan vendor:publish --provider="App\Modules\ServiceWorker\Providers\ServiceWorkerServiceProvider" --tag=serviceworker-assets

Frontend usage

import serviceWorkerManager from '@/utils/serviceWorker';

serviceWorkerManager.init(page.props);
serviceWorkerManager.register();

The manager automatically shares configuration via Inertia props and exposes helpers for clearing caches, pushing config updates, etc.

Service worker route

The module registers GET /service-worker-module/sw.js, which serves the worker code. The published public/sw.js bootstrap simply importScripts this route, so the worker always stays in sync with the module.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固