Replies: 1 comment
-
It looks like you've built your package such that npm/vite thinks it's a commonJS module rather than an ES Module. The syntax error is likely due to the fact that Here's a great article on how to build native ES modules: https://medium.com/dazn-tech/publishing-npm-packages-as-native-es-modules-41ffbc0a9dea |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
I am building a small library to integerate a 3rd party service to @shopify/hydrogen. Currently it is using
react
and@shopify/hydrogen
modules. I'm in need of some docs or guidance on babel config to build and publish it, and any configurations in vites in order to use it. At the moment, I'm able to build, publish the lib, however, when I install to use, I get errors likeunxpected token 'import'
. I've tried exporting withexport default
andmodule.exports
but no luck.Thank you.
KD
Beta Was this translation helpful? Give feedback.
All reactions