I'm building svelte components dynamically, and part of this process is an intermediate file called .compiled.html which is essentially a svelte component built from a series of files.
What I'm seeing is that the compiled component adopts this intermediate filename as the exported module name. As you can imagine .compiled is not a valid Javascript variable name:
function .compiled ( options ) { // invalid variable name
var component = this;
...
.compiled.prototype = template.methods;
export default .compiled;
This is an easy fix for me as I can simply specify the filename. However, I'd probably suggest that when I run:
svelte compile ./.compiled.html
that the default name is sanitized and either throws an error or is stripped of illegal characters during component generation.
I'm building svelte components dynamically, and part of this process is an intermediate file called
.compiled.htmlwhich is essentially a svelte component built from a series of files.What I'm seeing is that the compiled component adopts this intermediate filename as the exported module name. As you can imagine
.compiledis not a valid Javascript variable name:This is an easy fix for me as I can simply specify the filename. However, I'd probably suggest that when I run:
svelte compile ./.compiled.htmlthat the default name is sanitized and either throws an error or is stripped of illegal characters during component generation.