Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESM Export definition #9609

Closed
SamMousa opened this issue Mar 17, 2025 · 1 comment
Closed

ESM Export definition #9609

SamMousa opened this issue Mar 17, 2025 · 1 comment

Comments

@SamMousa
Copy link
Contributor

Describe the bug
Very cool that we finally have ESM modules!

According to the docs for package.json: https://docs.npmjs.com/cli/v11/configuring-npm/package-json#exports we should specify the module file in the exports key.

For me Vite is still importing the CommonJS, unless I add this to the package.json:

"exports": {
    ".": {
      "import": "./fesm/survey-js-ui.js",
      "require": "./survey-js-ui.js",
      "types": "./typings/survey-js-ui/entries/index.d.ts"
    }
  },

I notice this is part of the other packages.

@SamMousa
Copy link
Contributor Author

Nvm, fixed in #9583.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant