Dynamically inspecting JavaScript module exports in a web browser console

Viewed 106

I am dynamically loading a module as:

    onMount(async () => {
        if (browser) {
            const module = await import('jquery');
            console.log("jQuery module is", module);
        }
    }

This module was installed using npm install jquery and then made available in the web browser context by the standard SvelteKit builder toolchain.

How can I inspect in the web browser JavaScript console what symbols the module exports, as the module.default seems to be undefined?

Module itself does not seem to offer any dynamic inspection capabilities:

jQuery module is  Module {Symbol(Symbol.toStringTag): 'Module'} Symbol(Symbol.toStringTag): "Module"
0 Answers
Related