This commit is contained in:
fantasticit 2024-07-03 22:47:05 +08:00
parent 335ae26205
commit 708be2d0b8
5 changed files with 11802 additions and 9167 deletions

View File

@ -1,9 +1,16 @@
const semi = require('@douyinfe/semi-next').default({}); const semi = require('@douyinfe/semi-next').default({});
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
const withPWA = require('next-pwa');
const { getConfig } = require('@think/config'); const { getConfig } = require('@think/config');
const config = getConfig(); const config = getConfig();
const pwaRuntimeCaching = require('./pwa-cache'); const pwaRuntimeCaching = require('./pwa-cache');
const withPWA = require('next-pwa')({
disable: process.env.NODE_ENV !== 'production',
dest: 'public',
sw: 'service-worker.js',
runtimeCaching: pwaRuntimeCaching,
});
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = semi({ const nextConfig = semi({
@ -33,12 +40,6 @@ const nextConfig = semi({
typescript: { typescript: {
ignoreBuildErrors: true, ignoreBuildErrors: true,
}, },
pwa: {
disable: process.env.NODE_ENV !== 'production',
dest: 'public',
sw: 'service-worker.js',
runtimeCaching: pwaRuntimeCaching,
},
}); });
module.exports = withPWA(nextConfig); module.exports = withPWA(nextConfig);

View File

@ -79,7 +79,7 @@
"markdown-it-sub": "^1.0.0", "markdown-it-sub": "^1.0.0",
"markdown-it-sup": "^1.0.0", "markdown-it-sup": "^1.0.0",
"next": "12.1.0", "next": "12.1.0",
"next-pwa": "^5.5.2", "next-pwa": "^5.6.0",
"pdfjs-dist": "3.1.81", "pdfjs-dist": "3.1.81",
"prosemirror-codemark": "^0.3.6", "prosemirror-codemark": "^0.3.6",
"prosemirror-commands": "^1.3.0", "prosemirror-commands": "^1.3.0",
@ -128,6 +128,6 @@
"eslint-plugin-simple-import-sort": "^7.0.0", "eslint-plugin-simple-import-sort": "^7.0.0",
"fs-extra": "^10.0.0", "fs-extra": "^10.0.0",
"tsconfig-paths-webpack-plugin": "^3.5.2", "tsconfig-paths-webpack-plugin": "^3.5.2",
"typescript": "4.5.5" "typescript": "^4.8.4"
} }
} }

View File

@ -72,7 +72,6 @@
"@nestjs/schematics": "^8.0.0", "@nestjs/schematics": "^8.0.0",
"@nestjs/testing": "^8.0.0", "@nestjs/testing": "^8.0.0",
"@types/cookie-parser": "^1.4.3", "@types/cookie-parser": "^1.4.3",
"@types/cron": "^2.0.0",
"@types/express": "^4.17.13", "@types/express": "^4.17.13",
"@types/jest": "27.0.2", "@types/jest": "27.0.2",
"@types/lodash": "^4.14.182", "@types/lodash": "^4.14.182",
@ -93,7 +92,7 @@
"ts-loader": "^9.2.3", "ts-loader": "^9.2.3",
"ts-node": "^10.0.0", "ts-node": "^10.0.0",
"tsconfig-paths": "^3.10.1", "tsconfig-paths": "^3.10.1",
"typescript": "^4.3.5" "typescript": "^4.8.4"
}, },
"jest": { "jest": {
"moduleFileExtensions": [ "moduleFileExtensions": [

View File

@ -11,6 +11,7 @@
"outDir": "./dist", "outDir": "./dist",
"baseUrl": "./", "baseUrl": "./",
"incremental": true, "incremental": true,
"skipLibCheck": true,
"paths": { "paths": {
"@helpers/*": ["src/helpers/*"], "@helpers/*": ["src/helpers/*"],
"@pipes/*": ["src/pipes/*"], "@pipes/*": ["src/pipes/*"],

File diff suppressed because it is too large Load Diff