vbenjs / vite-plugin-mock

A mock plugin for vite.use mockjs.
MIT License
610 stars 96 forks source link

fix: dead loop listening and require is not defined #123

Closed haiweilian closed 8 months ago

haiweilian commented 8 months ago

在 Mac/Win 和 Vite/2/3/4/5(cjs/mjs) 下测试通过。

dead loop listening

fix: #115 fix: #98

监听排除 bundle-require 生成的临时文件,为了防止外部库更改文件生成规则,所以自定义文件名生成规则。

require is not defined

fix: #120 fix: #112 fix: #109 fix: #97

如果使用 bundle-require 由于每次都是新的文件名,不存在缓存问题。这代码应该是遗留的不再需要所以删除。

hooray commented 8 months ago

希望能尽快发布

haiweilian commented 8 months ago

@jinmao88 Publish to NPM?