diff --git a/web/next.config.js b/web/next.config.js index 8d95f37668..4ce716c418 100644 --- a/web/next.config.js +++ b/web/next.config.js @@ -3,28 +3,10 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({ enabled: process.env.ANALYZE === 'true', }); const { PHASE_DEVELOPMENT_SERVER } = require('next/constants'); -const runtimeCaching = require('next-pwa/cache'); const withPWA = require('next-pwa')({ dest: 'public', - runtimeCaching: [ - { - urlPattern: /\.(?:ts|m3u8)$/i, - handler: 'NetworkOnly', - }, - { - urlPattern: (url) => { return url.pathname.startsWith("/admin/"); }, - handler: 'NetworkOnly', - options: { - fetchOptions: { credentials: 'same-origin' } - } - }, - { - urlPattern: (url) => { return url.pathname.startsWith("/api/"); }, - handler: 'NetworkOnly', - }, - ...runtimeCaching, - ], + runtimeCaching: [], register: true, skipWaiting: true, disableDevLogs: true, @@ -77,7 +59,17 @@ module.exports = async phase => { unoptimized: true, }, swcMinify: true, - transpilePackages: [ "antd", "@ant-design", "rc-util", "rc-pagination", "rc-picker", "rc-notification", "rc-tooltip", "rc-tree", "rc-table" ], + transpilePackages: [ + 'antd', + '@ant-design', + 'rc-util', + 'rc-pagination', + 'rc-picker', + 'rc-notification', + 'rc-tooltip', + 'rc-tree', + 'rc-table', + ], webpack(config) { config.module.rules.push({ test: /\.svg$/i,