Skip to content

Commit

Permalink
fix: plugin.default is not a function (microsoft#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
sand4rt committed Nov 5, 2023
1 parent 766527c commit 3897622
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion playwright-ct-angular/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ function plugin() {
const { createPlugin } = require('@playwright/experimental-ct-core/lib/vitePlugin');
return createPlugin(
path.join(__dirname, 'registerSource.mjs'),
() => import('@analogjs/vite-plugin-angular').then(plugin => plugin.default({ jit: false }))
() => import('@analogjs/vite-plugin-angular').then(plugin => {
// TODO: remove the typeof plugin.default check
if (typeof plugin.default === 'function')
return plugin.default({ jit: false })
return plugin.default.default({ jit: false })
})
)
};

Expand Down

0 comments on commit 3897622

Please sign in to comment.