yuanman

Results 21 comments of yuanman

> Please provide a reproduction repo. By the way, it looks like a problem of @rollup/plugin-commonjs. > 请提供一个重现的仓库。顺便说一下,这看起来像@rollup/plugin-commonjs插件的问题。 在公司电脑没有权限上传github,其实就是一个很简单的demo,vitecli初始化一个vue项目,然后main文件中直接require了一个comm.js文件,这个comm文件中也require了一个test.js,这俩js就是一个通过module.exports导出一个值来测试一下,然后vite配置也如上图所示很简单: ![image](https://user-images.githubusercontent.com/22994293/134292247-46468d9e-a8a8-4c87-9574-76b0f0f732dd.png) ![image](https://user-images.githubusercontent.com/22994293/134292291-49acf15f-89da-4bd6-8037-f5afe76361bf.png) @rollup/plugin-commonjs插件我删除了,build以后,直接预览还是会提示require的问题

> 感谢使用`@originjs/vite-plugin-commonjs`,`vite build`的时候由[`@rollup/plugin-commonjs`](https://github.com/vitejs/vite/blob/main/packages/vite/src/node/build.ts#L294)处理commonJS代码,所以`@originjs/vite-plugin-commonjs`只能作用于`vite dev`。 > 你的问题[`transformMixedEsModules`](https://github.com/rollup/plugins/tree/master/packages/commonjs#transformmixedesmodules)选项可以解决,vite配置如下: > > ```js > build: { > commonjsOptions: { > transformMixedEsModules: true, > }, > } > ``` > > Thanks for using `@originjs/vite-plugin-commonjs`,`vite...

> vite默认就启用了`@rollup/plugin-commonjs`,不需要配置,`vite build`使用的是`roolup`打包的,也就是说本身roolup的特有插件也只能在`vite build`才会运行 > https://github.com/vitejs/vite/blob/main/packages/vite/src/node/build.ts#L294 > > `vite dev`不需要build,只需要预构建,所以我们这个插件只是补充了`vite dev`使用commonJS的述求,所以才只需要在`vite dev`生效即可。 你说vite默认就启用了@rollup/plugin-commonjs,不需要配置,指的是dev环境是吗?其实build的话,还是需要单独对@rollup/plugin-commonjs做一些配置的,比如transformMixedEsModules默认false,如果不改为ture,我试了下就会报require 未定义;

> @jwatte I have started looking at this, and I am not seeing a significant overhead when making ~1000 fetch calls. Can you please provide a little more details on...

> > @jwatte I have started looking at this, and I am not seeing a significant overhead when making ~1000 fetch calls. Can you please provide a little more details...

> Can you provide more details about your setup? I assume because of the zone context manager this must be a browser usecase. Are you using zone.js other than OTel?...

> I'm sorry I am not a zone expert so I'm not sure how to interpret this. Do you have a current workaround for your application code or are you...

> I'm sorry it isn't really clear from your report, but is the data actually sent successfully or not? Is the bug just the log statement? Can you include the...

> Do you want to merge any data into ended spans? > > How do you identify/search these spans? Yes, I hope that all spans will be cached for the...

> According to the spec resource is immutable. Also resource is shared across all spans and potentially across other signals like metric/logs. > > To me it looks like a...