Add webpack exclude to dynamic import
This commit is contained in:
parent
daa1c27d9b
commit
de0c8558fb
1 changed files with 7 additions and 1 deletions
|
|
@ -73,7 +73,13 @@ export default function Component({ service }) {
|
|||
?.filter((integration) => integration?.type)
|
||||
.map((integration) => ({
|
||||
// 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],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue