Closed ModyQyW closed 1 year ago
@ModyQyW 感谢你的反馈。 我查看了你的repo ( 我发现你设置了type=module
按照vite
自己的逻辑 他会认为他是一个纯esm 这时候原有的导出功能已经不够用了。 我会发布一个新版本解决这个问题。
应该在 package.json 里面补 exports 就好了,我可以提一个 pr
@ModyQyW 嗯。 因为 type=module
这种方式 node 需要重新导入模块。欢迎PR
@ModyQyW 0.6.1
版本已经发布 可以尝试一下。
还是不太正常,把我整不会了。
这是一个构建错误( 我会立马修复
我还以为是我哪里配置错了 😂
@ModyQyW 0.6.2
已恢复正常
一切正常,非常感谢。
Bug report 🐞
https://github.com/ModyQyW/playground
Version & Environment
我已阅读过文档,文档内的建议用法是
import { compression } from 'vite-plugin-compression'
。但我倾向于使用默认导入,而且代码内也有默认导出,没有提示类型错误,不太明白为什么不能使用
import compression from 'vite-plugin-compression'
。Expection
正常运行
Actual results (or Errors)