chore: remove redundant service-worker.js placeholder (#38348)

This commit is contained in:
Ville Brofeldt
2026-03-03 01:43:17 -08:00
committed by GitHub
parent 1bd054684e
commit f2f55591ec
3 changed files with 2 additions and 34 deletions

2
.gitignore vendored
View File

@@ -68,11 +68,11 @@ superset-websocket/config.json
*.js.map
node_modules
npm-debug.log*
superset/static/*
superset/static/assets/*
!superset/static/assets/.gitkeep
superset/static/uploads/*
!superset/static/uploads/.gitkeep
superset/static/version_info.json
yarn-error.log
*.map
*.min.js

View File

@@ -324,12 +324,7 @@ const config = {
menu: addPreamble('src/views/menu.tsx'),
spa: addPreamble('src/views/index.tsx'),
embedded: addPreamble('src/embedded/index.tsx'),
// Skip service-worker build in dev mode to avoid overwriting the placeholder
...(isDevMode
? {}
: {
'service-worker': path.join(APP_DIR, 'src/service-worker.ts'),
}),
'service-worker': path.join(APP_DIR, 'src/service-worker.ts'),
},
cache: {
type: 'filesystem',

View File

@@ -1,27 +0,0 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
// Minimal service worker for PWA file handling support
self.addEventListener('install', event => {
event.waitUntil(self.skipWaiting());
});
self.addEventListener('activate', event => {
event.waitUntil(self.clients.claim());
});