vite-plugin-style-import icon indicating copy to clipboard operation
vite-plugin-style-import copied to clipboard

无法使用可选链

Open MssText opened this issue 2 years ago • 5 comments

插件源码中使用了可选链,但是可选链的 node版本需要 14+,文档中是兼容到node 12+,文档需要更新下:

 configResolved(resolvedConfig) {
      needSourcemap = !!resolvedConfig.build.sourcemap;
      external = resolvedConfig?.build?.rollupOptions.external ?? void 0;
    },

MssText avatar Feb 16 '22 13:02 MssText

I am having the same problem. Any solution or workaround please?

georgeyaacoub avatar Apr 03 '22 15:04 georgeyaacoub

I am having the same problem. Any solution or workaround please?

Maybe upgrading your Node version to 14+ can solve this problem

MssText avatar Apr 11 '22 13:04 MssText

yup, upgrading to Node 14 solved it. thx

georgeyaacoub avatar Apr 11 '22 13:04 georgeyaacoub

I have upgraded to Node 16 but it still doesn't solve the problem

tangerball avatar May 23 '22 07:05 tangerball

I have upgraded to Node 16 but it still doesn't solve the problem upgrading to Node 14

MssText avatar May 27 '22 08:05 MssText