If you want to use module-federation/vite in combination with SvelteKit. The hostInit file does not get included in the generated output. The file is compiled, but the reference is missing.
It used to work in version 1.1.3 of this package.
In version 1.1.4 there was a fix for the issue #167. This caused the problem.
After the fix the hostInit will be referenced directly in the html
element in a script tag. Therefore, the plugin check every file ending with '.html' (see pluginAddEntry.ts)
SvelteKit does not generate any HTML files. The
element is generated on the server side due to ssr. A template of the base html file is part of the generated internal.js file.
The inject: 'html' causes the problem. If you are setting this value to 'entry' or simply remove it the hostInit will be referenced as before the issue #167.
Should this field be made configurable? Or can it be injected as an entry for svelte kit projects as before?
If you want to use module-federation/vite in combination with SvelteKit. The hostInit file does not get included in the generated output. The file is compiled, but the reference is missing.
It used to work in version 1.1.3 of this package.
In version 1.1.4 there was a fix for the issue #167. This caused the problem. After the fix the hostInit will be referenced directly in the html
element in a script tag. Therefore, the plugin check every file ending with '.html' (see pluginAddEntry.ts)SvelteKit does not generate any HTML files. The
element is generated on the server side due to ssr. A template of the base html file is part of the generated internal.js file.The
inject: 'html'
causes the problem. If you are setting this value to 'entry' or simply remove it the hostInit will be referenced as before the issue #167.Should this field be made configurable? Or can it be injected as an entry for svelte kit projects as before?