Results 14 comments of BlairOu

> 你看下官网 “限制图片数量” 那个例子,`maxCount = 1` 就好了 `maxCount = 1` 图片按钮都隐藏了,怎么更改avatar呢?所以我意思是,能不能`showUpload `可以用户自己设定,这样就算图片数量超过`maxCount`,用户还是可以操作upload btn

> > > 1. 右上角有个 ❎ > 2. `showUpload` 支持自己设置的 好,虽然 `showUpload` 可以设置,但是设置“限制图片数量” `maxCount = 1 `时,按钮就会默认被隐藏,这时候用户必须每次都要点击❎后,才能再次显示 `upload btn`,这样感觉挺奇怪的

> chrome报错如下: `Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "". Strict MIME type checking is enforced for module...

> if (a) { require('a.js'); require('b.scss'); } > > if (b) { require(c.js'); } > > if (c) { require('d.js'); } 不知道是不是由于动态require的关系,即使transformMixedEsModules配置为true后,问题还是存在 ‘require is not defined’ 我的也是动态引入,也是开启了一样报错,请问最后你的问题解决了么

> transformMixedEsModules配置为true后,问题还是存在 ‘require is not defined’ 你的问题解决了吗

> transformMixedEsModules:true,打包还是报 require is not defined 已经放弃require的使用。。。

may be it's better to use [vite-plugin-imp](https://github.com/onebay/vite-plugin-imp) vite-plugin-imp is in [awesome-vite](https://github.com/vitejs/awesome-vite)

遇到同样的问题,希望作者能够做一下判断,非常感谢

> 然后去node_modules@wangeditor\editor-for-vue\package.json 加入"type": "module", 又会报 > > ``` > build error: > TypeError: document.getElementsByTagName is not a function > at Object.currentScript (D:\work\Project\plm-vue\plm-vue-lib\docs\node_modules\@wangeditor\editor\dist\index.js:23648:12752) > ``` > > 尝试了动态组件,ClientOnly,甚至按照包但是组件里面不使用都会报一样的错误 原因是在nodejs里没有document对象,导致报错 希望官方处理下,感谢! 这个问题你有自己解决了么

> > 原因是在nodejs里没有document对象,导致报错 > > SSR 没问题,用 Next.js 和 Nuxt.js 都可以正常运行的 但是vitepress打包会报错,可以帮忙看看吗