浏览代码

chore: integrate code-inspector-plugin (#3900)

TinsFox 1 年之前
父节点
当前提交
8746e48df0
共有 3 个文件被更改,包括 444 次插入357 次删除
  1. 5 0
      web/next.config.js
  2. 1 0
      web/package.json
  3. 438 357
      web/yarn.lock

+ 5 - 0
web/next.config.js

@@ -1,3 +1,4 @@
+const { codeInspectorPlugin } = require('code-inspector-plugin')
 const withMDX = require('@next/mdx')({
   extension: /\.mdx?$/,
   options: {
@@ -13,6 +14,10 @@ const withMDX = require('@next/mdx')({
 
 /** @type {import('next').NextConfig} */
 const nextConfig = {
+  webpack: (config, { dev, isServer }) => {
+    config.plugins.push(codeInspectorPlugin({ bundler: 'webpack' }))
+    return config
+  },
   productionBrowserSourceMaps: false, // enable browser source map generation during the production build
   // Configure pageExtensions to include md and mdx
   pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],

+ 1 - 0
web/package.json

@@ -107,6 +107,7 @@
     "@types/sortablejs": "^1.15.1",
     "@types/uuid": "^9.0.8",
     "autoprefixer": "^10.4.14",
+    "code-inspector-plugin": "^0.13.0",
     "cross-env": "^7.0.3",
     "eslint": "^8.36.0",
     "eslint-config-next": "^14.0.4",

文件差异内容过多而无法显示
+ 438 - 357
web/yarn.lock


部分文件因为文件数量过多而无法显示