originjs / vite-plugin-federation

Module Federation for vite & rollup
Other
2.16k stars 227 forks source link

When the sourcemap in build mode is true, the source file cannot be generated correctly #355

Closed feifeilian closed 1 year ago

feifeilian commented 1 year ago

When the sourcemap in build mode is true, the source file cannot be generated correctly. the plugin version is 1.2.0 Hope to solve this problem.

image image
includeios commented 1 year ago

i have the same issue. acording to previous topic this issue has been fixed by this commit: https://github.com/originjs/vite-plugin-federation/pull/232. @ruleeeer

i install the latest version: 1.2.1 but still log this warning on building:

image

environment: node18 & pnpm7

includeios commented 1 year ago

Hi, @ruleeeer i would if this issue is being fixed. and i find the problem is in this line of code:

Since we use magicString.prepend to modified the original code, we must generate modified code to newest sourcemap

i pull a commit like this. Looking forward to your reply

ruleeeer commented 1 year ago

It seems that this problem has been fixed by @includeios. I will close this issue as scheduled. If you have any questions later, please open it.