Open gt-daifan opened 2 weeks ago
我看 example 里面是和 vite 一起跑的?
https://github.com/canyon-project/canyon/blob/main/examples/next-swc/next.config.mjs 新加了next swc的配置
我用的是 nextjs 13.4 似乎不行
得先确认你的next使用的是babel还是swc
得先确认你的next使用的是babel还是swc
是 swc ,在 experimental 里面加 swcPlugins,但是会报一个 cache 的错误。Error: Filesystem cache is not enabled, cannot read plugin from phsyical path 不知道该怎么弄。😭
得先确认你的next使用的是babel还是swc
是 swc ,在 experimental 里面加 swcPlugins,但是会报一个 cache 的错误。Error: Filesystem cache is not enabled, cannot read plugin from phsyical path 不知道该怎么弄。😭
是不是需要先安装一下 npm install swc-plugin-coverage-instrument -D
得先确认你的next使用的是babel还是swc
是 swc ,在 experimental 里面加 swcPlugins,但是会报一个 cache 的错误。Error: Filesystem cache is not enabled, cannot read plugin from phsyical path 不知道该怎么弄。😭
或者看一下这个issue,貌似需要用 nextjs 13.4.3 ,我试过最新的14以上的可以 https://github.com/blitz-js/next-superjson-plugin/issues/84
确实13.4.4 才有这个问题
是支持的,可以使用 https://github.com/kwonoj/swc-plugin-coverage-instrument ,插桩成功后可以进行后续的测试用例+覆盖率上报,不过 swc-plugin-coverage-instrument 这个插件目前处于实验阶段