-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
Mermaid 9.2.0 triggers webpack import warning #3757
Comments
I was having the same problem with our Backstage instance and trying to add that plugin in. I resolved the issue for now by setting the resolution in the top level package.json to lock it to Mermaid v9.1.1. It seems that this change
I am guessing PR #3591 broke Webpack being able to import Mermaid |
This is also probably a duplicate of #3754 |
FYI: Even with 9.2.1, I still see |
But the fix for that is in #3774, which hasn't been merged yet due to pnpm issue. |
Thanks, but the release notes say, that this MR ist fixed:
|
Can you please test |
9.2.2 works for me. |
Description
When I import Mermaid in my Webpack project (based on backstage with plugin techdocs-addon-mermaid, 9.2.0 triggers a warning.
After investigating, it seems this is due to uses of
await import(url)
andawait import(diagram)
,url
anddiagram
being dynamic. Webpack sees that as bad.I would recommend
Steps to reproduce
Use Mermaid 9.2.0 in a project that uses Webpack 5.7.0
Build in development mode
See the issue
or
Install Backstage with Yarn 3 and up-to-date packages
Install plug-in https://github.com/johanneswuerbach/backstage-plugin-techdocs-addon-mermaid but set MermaidJS version to 9.2.0
run yarn dev
see the error in the web UI.
Screenshots
No response
Code Sample
No response
Setup
Desktop
Additional Context
No response
The text was updated successfully, but these errors were encountered: