suguanYang

Results 21 comments of suguanYang

I can give an example if needed

I think the problem is that vite use `moduleResolution` that similar to `node` to resolve the imports, but the tsc use `nodenext` that specified in the tsconfig. @sapphi-red

You have 2 solutions: 1. use `node` as the `moduleResolution`, and change the `import { MyTsClass } from './myTsFile.ts'` to `import { MyTsClass } from './myTsFile'` , the behavior will...

> Thank you @suguanYang! > > I was just reading the [TypeScript 5.0 beta announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-0-beta/#moduleresolution-bundler) and there's yet a new `moduleResolution` option coming soon named "bundler" which looks like would...

https://github.com/vitejs/vite/issues/1973#issuecomment-787571499

> any updates on this ? I just append the new statement to the start of the file https://github.com/suguanYang/next-web/blob/834df2c753025536af2ff4f49df7faffa05536ad/packages/server/src/config/plugins/vite-plugin-externals/index.ts#L63

> Yes, all defaults - nothing in .yarnrc.yml at all. I have similar issue when use babel loader, and it's caused by an 'import(xxx)' in a cjs file https://github.com/babel/babel-loader/issues/1015

I have the same issue, solved by external all `@fullcalendar/core/internal.js` imports, make they all import the same module

Ok, I really mean I ran into simillar situation when I bundless all my dependencies and imported as ESM at runtime, I had to patch on @fullcalendar/core and @fullcalendar/timegrid's node_module...