Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: 使用vite-plugin-fake-server替换vite-plugin-mock,使用@faker-js/faker替换mockjs #763

Merged
merged 9 commits into from
Nov 10, 2023

Conversation

xiaoxian521
Copy link
Member

@xiaoxian521 xiaoxian521 commented Oct 20, 2023

vite-plugin-mock不完全兼容vite5且强依赖mockjs,而mockjs很久未维护,里面的一些写法(比如eval函数)跟不上前端工具vite潮流,打包会输出Use of eval in "node_modules/.pnpm/[email protected]/node_modules/mockjs/dist/mock.js" is strongly discouraged as it poses security risks and may cause issues with minification提示信息,如下图

image

平台打算替换这两个工具,感谢开发者的付出,感谢开源❤️

@xiaoxian521 xiaoxian521 changed the title refactor: 使用vite-plugin-fake-server替换vite-plugin-mock,使用`@faker-j… refactor: 使用vite-plugin-fake-server替换vite-plugin-mock,使用@faker-js/faker替换mockjs Oct 20, 2023
@xiaoxian521 xiaoxian521 added PR::WIP 正在开发中 test:waiting 等待测试 labels Oct 20, 2023
@xiaoxian521
Copy link
Member Author

xiaoxian521 commented Oct 20, 2023

此处的修改特别备注下:TypeScript 5 提供了新的moduleResolution配置选项bundler,它同时兼容 ESM(ECMAScript module)CommonJS 两种标准的模块解析策略,而且没有 ESMNodejs 中的限制。具体看 microsoft/TypeScript#51669

@xiaoxian521 xiaoxian521 added v5.1.0 Windows:Waiting for test 等待使用Windows系统进行详细测试 v5.0.0 5.0.0版本 and removed test:waiting 等待测试 PR::WIP 正在开发中 v5.1.0 labels Oct 30, 2023
@xiaoxian521 xiaoxian521 removed the Windows:Waiting for test 等待使用Windows系统进行详细测试 label Nov 2, 2023
@xiaoxian521 xiaoxian521 added the test:pass 测试通过 label Nov 10, 2023
@xiaoxian521 xiaoxian521 merged commit 6e195c8 into main Nov 10, 2023
1 check passed
@xiaoxian521 xiaoxian521 deleted the refactor/fake-server branch November 10, 2023 04:33
@juukee
Copy link

juukee commented Jan 5, 2024

@xiaoxian521
Copy link
Member Author

额 看计划 #748

@pure-admin pure-admin locked and limited conversation to collaborators Jan 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
test:pass 测试通过 v5.0.0 5.0.0版本
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants