Skip to content

ECMAScript Module Support #133

@paulrosen

Description

@paulrosen

I have the following in package.json:

"@webcoder49/code-input": "2.2.1",

I am trying to import it and have tried each of the following:

import CodeInput from "@webcoder49/code-input";
import {CodeInput} from "@webcoder49/code-input/code-input";
import codeInput from "@webcoder49/code-input/code-input";
import {codeInput} from "@webcoder49/code-input/code-input";
import {CodeInput} from "@webcoder49/code-input/code-input";
import {CodeInput, templates, registerTemplate} from "@webcoder49/code-input/code-input";

and some other variations.

The last version doesn't give me any errors in WebStorm's editor, but gives this when I run:

Uncaught SyntaxError: The requested module '/node_modules/.vite/deps/@webcoder49_code-input_code-input.js?v=0ada030b' does not provide an export named 'default'

Is there a complete example somewhere of how to use this in a vite project?

Metadata

Metadata

Assignees

Labels

area:externalA bug/feature due to integration with another library / JavaScript framework, but not the browser.enhancementNew feature or requestpriority:mediumstatus:workedaroundA workaround has been sent.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions