lunar-typescript icon indicating copy to clipboard operation
lunar-typescript copied to clipboard

使用vite构建后出现TypeError: undefined is not a non-null object

Open ivistang opened this issue 3 years ago • 3 comments

我猜测是commonJS的兼容性问题。 具体报错在Object.defineProperty(LunarTime, "__esModule", { value: true });处,提示LunarTimeundefined。 目前我使用lunar-javascript构建则不会出现此问题。

ivistang avatar Aug 12 '22 09:08 ivistang

我也出现了这样的问题,请问你有解决的方案了吗

ikangjie avatar Aug 22 '22 08:08 ikangjie

我的解决方案是直接从lunar-javascript调取函数,然后从lunar-typescript源码获取函数的interface。

ivistang avatar Aug 23 '22 05:08 ivistang

v1.2.23导出了LunarTime,之前遗漏了。

6tail avatar Aug 23 '22 05:08 6tail