diff --git a/.gitignore b/.gitignore index f86395f0a5c..c9699e830dc 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/superset-frontend/webpack.config.js b/superset-frontend/webpack.config.js index 77cadb862f6..7dffa33dd1c 100644 --- a/superset-frontend/webpack.config.js +++ b/superset-frontend/webpack.config.js @@ -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', diff --git a/superset/static/service-worker.js b/superset/static/service-worker.js deleted file mode 100644 index 43cb14a4894..00000000000 --- a/superset/static/service-worker.js +++ /dev/null @@ -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()); -});