mirror of
https://github.com/gethomepage/homepage.git
synced 2026-05-18 11:27:33 +08:00
Add webpack exclude to dynamic import
This commit is contained in:
@@ -73,7 +73,13 @@ export default function Component({ service }) {
|
|||||||
?.filter((integration) => integration?.type)
|
?.filter((integration) => integration?.type)
|
||||||
.map((integration) => ({
|
.map((integration) => ({
|
||||||
// Include the extension so Vite/Vitest can statically validate the import base.
|
// Include the extension so Vite/Vitest can statically validate the import base.
|
||||||
service: dynamic(() => import(`./integrations/${integration.type}.jsx`)),
|
service: dynamic(
|
||||||
|
() =>
|
||||||
|
import(
|
||||||
|
/* webpackExclude: /\.test\.jsx$/ */
|
||||||
|
`./integrations/${integration.type}.jsx`
|
||||||
|
),
|
||||||
|
),
|
||||||
widget: { ...widget, ...integration },
|
widget: { ...widget, ...integration },
|
||||||
})) ?? [],
|
})) ?? [],
|
||||||
[widget],
|
[widget],
|
||||||
|
|||||||
Reference in New Issue
Block a user