Open daemuth opened 2 years ago
Update: I have tried to run the example on WSL and it has worked without a hitch. This seems to be related to #12 in some way. I'm currently investigating why the resolution of the modules fails on Windows but not getting far yet.
Temporary workaround: Inserting fileName = fileName.replaceAll("\\", "\\\\")
after fileName = path.resolve(svelteDir, fileName)
seems to solve this problem. I am not certain why.
Issue description The standalone example is non-functional. Creating a build (with the workaround mentioned in #12) of the plugin, then running the example will result in a webpage that does not contain the interactive Svelte elements.
Steps to reproduce
example
foldernpm run start
inexample
folder'C:UsersdaemuthWorkeleventy-plugin-embed-svelteexamplesvelteGreeter.svelte' is imported by virtual:entry, but could not be resolved – treating it as an external dependency 'C:UsersdaemuthWorkeleventy-plugin-embed-svelteexamplesvelteCounter.svelte' is imported by virtual:entry, but could not be resolved – treating it as an external dependency No name was provided for external module 'C:UsersdaemuthWorkeleventy-plugin-embed-svelteexamplesvelteGreeter.svelte' in output.globals – guessing 'C_UsersdaemuthWorkeleventyPluginEmbedSvelteexamplesvelteGree ter_svelte' No name was provided for external module 'C:UsersdaemuthWorkeleventy-plugin-embed-svelteexamplesvelteCounter.svelte' in output.globals – guessing 'C_UsersdaemuthWorkeleventyPluginEmbedSvelteexamplesvelteCoun ter_svelte'