Skip to content

Commit

Permalink
fix(vite-plugin-angular): add inline deps for angular testing library (
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonroberts authored Dec 4, 2024
1 parent 3901101 commit 915a57a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/vite-plugin-angular/src/lib/angular-vitest-plugin.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { Plugin, transformWithEsbuild, UserConfig } from 'vite';

/**
* Sets up test config for Vitest
* and downlevels any dependencies that use
* async/await to support zone.js testing
* and tests w/fakeAsync
*/
export function angularVitestPlugin(): Plugin {
return {
name: '@analogjs/vitest-angular-esm-plugin',
Expand All @@ -19,9 +25,14 @@ export function angularVitestPlugin(): Plugin {
server: {
deps: {
inline: [
'@angular/common',
'@angular/core',
'@angular/router',
'@angular/platform-browser',
'@angular/material',
'@analogjs/router',
'@analogjs/vitest-angular/setup-zone',
'@testing-library/angular',
],
},
},
Expand Down

0 comments on commit 915a57a

Please sign in to comment.