Replies: 1 comment 2 replies
-
|
Have you tried any other lib? https://unpkg.com/browse/@shoelace-style/react@2.0.0-beta.40/dist/ dist/index.js does not even exist, not sure this lib is going the right thing by asking users to import from dist/button The problem with libraries in ESM is that you also have to setup webpack/babel so that they get transpiled. We have an internal "LibrariesToTranspile" array for such cases but no API to add the ability to add extra libraries. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to import a package provided as ESM. Let's take @shoelace-style/react as an example.
By default, when I want to import this package in Docusaurus 2 project, I get this error:
I found a way to solve the "BREAKING CHANGE" issue by creating a plugin.
The problem I can't solve is that it can't resolve dependencies.
It's probably Babel/Webpack configuration issue but I don't know how to fix that. Any ideas?
I created a sample repository: https://github.com/eshlox/docusaurus-esm-test
Beta Was this translation helpful? Give feedback.
All reactions