vite-plugin-federation icon indicating copy to clipboard operation
vite-plugin-federation copied to clipboard

error: Uncaught SyntaxError: Cannot use 'import.meta' outside a module

Open huajian123 opened this issue 1 year ago • 5 comments

Versions

  • vite-plugin-federation: ^1.2.3
  • vite: ^4.3.5

Reproduction

Use angular12 webpack5 as the host, vite as remote, and export a vue component, there will be such an error image Perhaps adding a scriptType attribute can fix this https://github.com/angular-architects/module-federation-plugin/issues/96#issuecomment-981896034

huajian123 avatar May 30 '23 10:05 huajian123

here is simple source code vue as remote:https://github.com/huajian123/dpt-vue angular as shell:https://github.com/huajian123/ng-test-mf

huajian123 avatar May 31 '23 06:05 huajian123

the angular as shell is returning a 404 error.

I'm running into this same issue with a

HOST: Craco/Create React App REMOTE: Vite

Was hoping to get some tips about how this could be resolved.

swalker326 avatar Jun 05 '23 11:06 swalker326

the angular as shell is returning a 404 error.

I'm running into this same issue with a

HOST: Craco/Create React App REMOTE: Vite

Was hoping to get some tips about how this could be resolved.

I fixed it

huajian123 avatar Jun 09 '23 00:06 huajian123

the angular as shell is returning a 404 error. I'm running into this same issue with a HOST: Craco/Create React App REMOTE: Vite Was hoping to get some tips about how this could be resolved.

I fixed it

how?

agewall avatar Jul 11 '23 07:07 agewall

@huajian123 How did you fix it?

rahulkanneri avatar Mar 27 '24 04:03 rahulkanneri