mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-15 16:51: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')({
|
||||
enabled: process.env.ANALYZE === 'true',
|
||||
});
|
||||
// import NextBundleAnalyzer from '@next/bundle-analyzer';
|
||||
//
|
||||
// const withBundleAnalyzer = NextBundleAnalyzer({
|
||||
// enabled: process.env.ANALYZE === 'true',
|
||||
// });
|
||||
|
||||
/**
|
||||
* @type {import('next').NextConfig}
|
||||
*/
|
||||
const nextConfig = {
|
||||
/* config options here */
|
||||
reactStrictMode: true,
|
||||
swcMinify: true,
|
||||
output: 'standalone',
|
||||
@ -71,8 +72,9 @@ const KEYS_TO_OMIT = [
|
||||
'assetPrefix',
|
||||
];
|
||||
|
||||
module.exports = (_phase, { defaultConfig }) => {
|
||||
const plugins = [[withBundleAnalyzer, {}]];
|
||||
export default function finalConfig(_phase, { defaultConfig }) {
|
||||
// const plugins = [[withBundleAnalyzer, {}]];
|
||||
const plugins = [[(config) => config, {}]];
|
||||
|
||||
const wConfig = plugins.reduce(
|
||||
(acc, [plugin, config]) => plugin({ ...acc, ...config }),
|
||||
@ -90,4 +92,4 @@ module.exports = (_phase, { defaultConfig }) => {
|
||||
});
|
||||
|
||||
return finalConfig;
|
||||
};
|
||||
}
|
@ -59,7 +59,6 @@
|
||||
"eslint-config-next": "14.2.7",
|
||||
"file-loader": "^6.2.0",
|
||||
"gray-matter": "^4.0.3",
|
||||
"husky": "^9.1.6",
|
||||
"leva": "^0.9.35",
|
||||
"postcss": "^8.4.47",
|
||||
"prettier": "^3.3.3",
|
||||
|
Reference in New Issue
Block a user