mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-15 08:41:37 +00:00
chore(next): refactor nextjs config to mjs
remove husky
This commit is contained in:
@ -1,5 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
. "$(dirname -- "$0")/_/husky.sh"
|
|
||||||
|
|
||||||
pnpm pretty-check
|
|
||||||
# pnpm lint
|
|
@ -1,12 +1,13 @@
|
|||||||
const withBundleAnalyzer = require('@next/bundle-analyzer')({
|
// import NextBundleAnalyzer from '@next/bundle-analyzer';
|
||||||
enabled: process.env.ANALYZE === 'true',
|
//
|
||||||
});
|
// const withBundleAnalyzer = NextBundleAnalyzer({
|
||||||
|
// enabled: process.env.ANALYZE === 'true',
|
||||||
|
// });
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {import('next').NextConfig}
|
* @type {import('next').NextConfig}
|
||||||
*/
|
*/
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
/* config options here */
|
|
||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
swcMinify: true,
|
swcMinify: true,
|
||||||
output: 'standalone',
|
output: 'standalone',
|
||||||
@ -71,8 +72,9 @@ const KEYS_TO_OMIT = [
|
|||||||
'assetPrefix',
|
'assetPrefix',
|
||||||
];
|
];
|
||||||
|
|
||||||
module.exports = (_phase, { defaultConfig }) => {
|
export default function finalConfig(_phase, { defaultConfig }) {
|
||||||
const plugins = [[withBundleAnalyzer, {}]];
|
// const plugins = [[withBundleAnalyzer, {}]];
|
||||||
|
const plugins = [[(config) => config, {}]];
|
||||||
|
|
||||||
const wConfig = plugins.reduce(
|
const wConfig = plugins.reduce(
|
||||||
(acc, [plugin, config]) => plugin({ ...acc, ...config }),
|
(acc, [plugin, config]) => plugin({ ...acc, ...config }),
|
||||||
@ -90,4 +92,4 @@ module.exports = (_phase, { defaultConfig }) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return finalConfig;
|
return finalConfig;
|
||||||
};
|
}
|
@ -59,7 +59,6 @@
|
|||||||
"eslint-config-next": "14.2.7",
|
"eslint-config-next": "14.2.7",
|
||||||
"file-loader": "^6.2.0",
|
"file-loader": "^6.2.0",
|
||||||
"gray-matter": "^4.0.3",
|
"gray-matter": "^4.0.3",
|
||||||
"husky": "^9.1.6",
|
|
||||||
"leva": "^0.9.35",
|
"leva": "^0.9.35",
|
||||||
"postcss": "^8.4.47",
|
"postcss": "^8.4.47",
|
||||||
"prettier": "^3.3.3",
|
"prettier": "^3.3.3",
|
||||||
|
Reference in New Issue
Block a user