Commit da049b93 by weiyudumei

fix: 移除@scripts/test-helper依赖,解决内网安装报错

parent 061f93c9
...@@ -34,8 +34,7 @@ ...@@ -34,8 +34,7 @@
"less-loader": "^12.2.0", "less-loader": "^12.2.0",
"prebundle": "1.2.2", "prebundle": "1.2.2",
"typescript": "^5.5.2", "typescript": "^5.5.2",
"@rsbuild/core": "1.0.1-beta.9", "@rsbuild/core": "1.0.1-beta.9"
"@scripts/test-helper": "1.0.1-beta.9"
}, },
"peerDependencies": { "peerDependencies": {
"@rsbuild/core": "^1.0.1-beta.9" "@rsbuild/core": "^1.0.1-beta.9"
......
...@@ -29,8 +29,7 @@ ...@@ -29,8 +29,7 @@
"devDependencies": { "devDependencies": {
"@types/node": "18.x", "@types/node": "18.x",
"typescript": "^5.5.2", "typescript": "^5.5.2",
"@rsbuild/core": "1.0.1-beta.9", "@rsbuild/core": "1.0.1-beta.9"
"@scripts/test-helper": "1.0.1-beta.9"
}, },
"peerDependencies": { "peerDependencies": {
"@rsbuild/core": "^1.0.1-beta.9" "@rsbuild/core": "^1.0.1-beta.9"
......
...@@ -38,8 +38,7 @@ ...@@ -38,8 +38,7 @@
"svgo": "^3.3.2", "svgo": "^3.3.2",
"typescript": "^5.5.2", "typescript": "^5.5.2",
"url-loader": "4.1.1", "url-loader": "4.1.1",
"@rsbuild/core": "1.0.1-beta.9", "@rsbuild/core": "1.0.1-beta.9"
"@scripts/test-helper": "1.0.1-beta.9"
}, },
"peerDependencies": { "peerDependencies": {
"@rsbuild/core": "^1.0.1-beta.9" "@rsbuild/core": "^1.0.1-beta.9"
......
...@@ -6,10 +6,31 @@ ...@@ -6,10 +6,31 @@
## 包含的包 ## 包含的包
### 核心依赖包
- `unrs-resolver@1.11.1` - Rust相关的解析器包 - `unrs-resolver@1.11.1` - Rust相关的解析器包
- `eslint-import-context@0.1.9` - ESLint导入上下文插件 - `eslint-import-context@0.1.9` - ESLint导入上下文插件
- `@rsbuild/plugin-image-compress@1.1.0` - Rsbuild图片压缩插件 - `@rsbuild/plugin-image-compress@1.1.0` - Rsbuild图片压缩插件
### Rsbuild 相关包
- `@rsbuild/core@1.0.1-beta.9` - Rsbuild 核心包
- `@rsbuild/plugin-less@1.0.1-beta.9` - Less 插件
- `@rsbuild/plugin-react@1.0.1-beta.9` - React 插件
- `@rsbuild/plugin-svgr@1.0.1-beta.9` - SVGR 插件
- `@rsbuild/plugin-typed-css-modules@1.0.1-beta.9` - CSS 模块类型插件
### ESLint 相关包
- `eslint@9.0.0` - ESLint 核心
- `eslint-plugin-react-hooks@4.6.0` - React Hooks 规则
- `eslint-plugin-react-refresh@0.4.4` - React Refresh 规则
- `@eslint/compat@9.0.0` - ESLint 兼容性包
- `@eslint-react/eslint-plugin@1.5.8` - React ESLint 插件
- `@antfu/eslint-config@3.0.0` - Antfu ESLint 配置
### Rspack 相关包
- `@rspack/core@1.0.0-beta.1` - Rspack 核心
- `@rspack/binding@1.0.0-beta.1` - Rspack 绑定包
- `@rspack-core/*` - Rspack 核心模块
## 配置方式 ## 配置方式
`package.json` 中直接引用本地包: `package.json` 中直接引用本地包:
...@@ -55,3 +76,11 @@ npm install --no-optional --legacy-peer-deps ...@@ -55,3 +76,11 @@ npm install --no-optional --legacy-peer-deps
- 如果需要更新包版本,需要手动下载新版本到 `packages` 目录 - 如果需要更新包版本,需要手动下载新版本到 `packages` 目录
- 建议将 `packages` 目录加入版本控制,确保团队环境一致 - 建议将 `packages` 目录加入版本控制,确保团队环境一致
- 项目已经配置好,可以直接使用 `npm run dev` 启动 - 项目已经配置好,可以直接使用 `npm run dev` 启动
## 问题修复记录
### 2024-08-14: 修复 @scripts/test-helper 依赖问题
- **问题**: 内网环境安装时报错 `@scripts/test-helper@1.0.1-beta.9` 包在 registry 中找不到
- **原因**: 该包是 `@rsbuild` 插件的开发依赖,在内网 registry 中不可用
- **解决方案**: 从 `@rsbuild/plugin-react``@rsbuild/plugin-less``@rsbuild/plugin-svgr``package.json` 中移除 `@scripts/test-helper` 依赖
- **影响**: 由于是开发依赖,移除后不影响生产构建和项目运行
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment