Skip to content

The module does not work with native ESM #326

@negezor

Description

@negezor

Continuation of the #247 issue as it has not been fixed.

Version

vue-final-modal: 4.0.1
vue: 3.2.47

OS

Windows

Reproduction Link

https://codesandbox.io/p/sandbox/distracted-field-p1orne

Steps to reproduce

  • Import module as Native ESM

What is Expected?

Imported module

What is actually happening?

(node:1) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension
file:///project/sandbox/index.js:3
import { VueFinalModal } from "vue-final-modal";
         ^^^^^^^^^^^^^
SyntaxError: Named export 'VueFinalModal' not found. The requested module 'vue-final-modal' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'vue-final-modal';
const { VueFinalModal } = pkg;

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions