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

fix: change entryfile for esm imports #67

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

hendrikheil
Copy link

@hendrikheil hendrikheil commented Oct 15, 2024

We're using this package to bring customer.io In-App Messages into our app without using the CDP packages.

Vite is our bundler (through nuxt) and throws this error when trying to load our app.

Uncaught SyntaxError: The requested module '/_nuxt/node_modules/customerio-gist-web/src/index.js?v=af707f79' does not provide an export named 'default' (at index.ts?v=af707f79:1:8)

We were able to workaround this by changing the entrypoint of the package like this in our vite config:

    resolve: {
      alias: {
        'customerio-gist-web': '/node_modules/customerio-gist-web/src/gist.js',
      },
    },

This PR aims to change the default entrypoint for ESM imports to that path directly.

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

Successfully merging this pull request may close these issues.

1 participant