Skip to main content
Create new
Introduction
Reactivity
Props
Logic
Events
Bindings
Lifecycle
Stores
Motion
Transitions
Animations
Easing
SVG
Actions
Classes
Component composition
Context API
Special elements
Module context
Debugging
7GUIs
Miscellaneous
App.svelte
CustomMenu.svelte
Icon.svelte
Menu.svelte
MenuDivider.svelte
MenuOption.svelte
menu.js
<script>
import CustomMenu from './CustomMenu.svelte';
</script>

<h1>
Right-Click Somewhere
</h1>

<CustomMenu />

Error compiling component

WebAssembly.instantiateStreaming(): value type opcode @+13
/* App.svelte generated by Svelte v3.25.0 */
import {
SvelteComponent,
create_component,
destroy_component,
detach,
element,
init,
insert,
mount_component,
noop,
safe_not_equal,
space,
transition_in,
transition_out
} from "svelte/internal";

import CustomMenu from "./CustomMenu.svelte";

function create_fragment(ctx) {
let h1;
let t1;
let custommenu;
let current;
custommenu = new CustomMenu({});

return {
c() {
h1 = element("h1");
h1.textContent = "Right-Click Somewhere";
t1 = space();
create_component(custommenu.$$.fragment);
},
m(target, anchor) {
insert(target, h1, anchor);
insert(target, t1, anchor);
result = svelte.compile(source, {
generate: ,
});
/* Add a <style> tag to see the CSS output */
		
			
				
  • {
    • html: Fragment {...}
      • start: 67
      • end: 116
      • type: "Fragment"
      • children: [...] (4)
        • Text {...}
          • start: 65
          • end: 67
          • type: "Text"
          • raw: "\n\n"
          • data: "\n\n"
          }
        • Element {...}
          • start: 67
          • end: 100
          • type: "Element"
          • name: "h1"
          • attributes: []
          • children: [...] (1)
            • Text {...}
              • start: 71
              • end: 95
              • type: "Text"
              • raw: "\n\tRight-Click Somewhere\n"
              • data: "\n\tRight-Click Somewhere\n"
              }
            ]
          }
        • Text {...}
          • start: 100
          • end: 102
          • type: "Text"
          • raw: "\n\n"
          • data: "\n\n"
          }
        • InlineComponent {...}
          • start: 102
          • end: 116
          • type: "InlineComponent"
          • name: "CustomMenu"
          • attributes: []
          • children: []
          }
        ]
      }
    • css: undefined
    • instance: Script {...}
      • type: "Script"
      • start: 0
      • end: 65
      • context: "default"
      • content: Program {...}
        • type: "Program"
        • start: 8
        • end: 56
        • loc: {...}
          • start: {...}
            • line: 1
            • column: 0
            }
          • end: {...}
            • line: 3
            • column: 0
            }
          }
        • body: [...] (1)
          • ImportDeclaration {...}
            • type: "ImportDeclaration"
            • start: 10
            • end: 55
            • loc: {...}
              • start: {...}
                • line: 2
                • column: 1
                }
              • end: {...}
                • line: 2
                • column: 46
                }
              }
            • specifiers: [...] (1)
              • ImportDefaultSpecifier {...}
                • type: "ImportDefaultSpecifier"
                • start: 17
                • end: 27
                • loc: {...}
                  • start: {...}
                    • line: 2
                    • column: 8
                    }
                  • end: {...}
                    • line: 2
                    • column: 18
                    }
                  }
                • local: Identifier {...}
                  • type: "Identifier"
                  • start: 17
                  • end: 27
                  • loc: {...}
                    • start: {...}
                      • line: 2
                      • column: 8
                      }
                    • end: {...}
                      • line: 2
                      • column: 18
                      }
                    }
                  • name: "CustomMenu"
                  }
                }
              ]
            • source: Literal {...}
              • type: "Literal"
              • start: 33
              • end: 54
              • loc: {...}
                • start: {...}
                  • line: 2
                  • column: 24
                  }
                • end: {...}
                  • line: 2
                  • column: 45
                  }
                }
              • value: "./CustomMenu.svelte"
              • raw: "'./CustomMenu.svelte'"
              }
            }
          ]
        • sourceType: "module"
        }
      }
    • module: undefined
    }
The AST is not public API and may change at any point in time