Issues with Modus Web Components and Vite #10
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
A simple solution from Raymond, In this screenshot you can see what I did for Quest. In a build step, I copy the entire modus-web-components directory, from node_modules, to the dist/assets directory that will eventually be served. In addition to that, I create a <script> tag in the app's index.html which references an entrypoint file for the web-components library. It's a pretty simple solution which took quite a bit of trial and error to get to. |
Beta Was this translation helpful? Give feedback.
-
Note: There's an issue created for this: trimble-oss/modus-web-components#1658. It's a known issue with loading Stencil components in a project that uses a bundler such as Vite. There's a flag to fix it which I think we should test for the next version. https://stenciljs.com/docs/config-extras#enableimportinjection |
Beta Was this translation helpful? Give feedback.
-
Closing the discussion since this Issue is fixed on trimble-oss/modus-web-components#1658. |
Beta Was this translation helpful? Give feedback.
Note: There's an issue created for this: trimble-oss/modus-web-components#1658. It's a known issue with loading Stencil components in a project that uses a bundler such as Vite. There's a flag to fix it which I think we should test for the next version.
https://stenciljs.com/docs/config-extras#enableimportinjection