小编Ama*_*man的帖子

如何将模块添加到 build.rollupOptions.external?

我正在尝试让 Algolia InstantSearch.js 与我的 Svelte 网站一起使用。当我尝试在 Netlify 上部署它时,出现以下错误:

9:27:35 PM: [vite]: Rollup failed to resolve import "instantsearch.js/es/widgets.js" from "src/components/Search/SearchSection.svelte".
9:27:35 PM: This is most likely unintended because it can break your application at runtime.
9:27:35 PM: If you do want to externalize this module explicitly add it to
9:27:35 PM: `build.rollupOptions.external`
9:27:35 PM: > [vite]: Rollup failed to resolve import "instantsearch.js/es/widgets.js" from "src/components/Search/SearchSection.svelte".
9:27:35 PM: This is most likely unintended because it can break your application at runtime.
9:27:35 PM: …
Run Code Online (Sandbox Code Playgroud)

node.js algolia rollupjs svelte

6
推荐指数
1
解决办法
6966
查看次数

标签 统计

algolia ×1

node.js ×1

rollupjs ×1

svelte ×1