[英]How can I include dagre/graphlib in a vue.js site built with vite
➜ npm create vite@latest
✔ Project name: … demo
✔ Select a framework: › vue
✔ Select a variant: › vue
一種解決方法是向 CommonJS 編譯模塊添加一個選項,它在 GitHub 上進行了討論: https ://github.com/vitejs/vite/issues/5759#issuecomment-1034461225
Vite 的配置文件應該這樣更改:
build: {
commonjsOptions: {
ignoreTryCatch: false
}
}
還要確保刪除 CommonJS Rollup 插件。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.