Closed hgodinho closed 1 year ago
It seems that default import of remark-docx is treated as commonjs but unist-util-visit is published as esm only. So it may be solved if you transpile unist-util-visit to commonjs, such as transpilePackages in Next.js.
I'm not sure why remark-docx is detected as commonjs. It depends on your build tools.
Actually I'm not using any building script. I created this repo with a minimal test, just as documented in README.md and the error still occurs: https://github.com/hgodinho/remark-docx-test
Published in 0.1.4
.
Describe the bug When I made the PR I tested using the storybook app, now Im trying to use in another application and getting errors: if I try the default import:
if I try to import the mjs module: