Skip to content

Commit

Permalink
Implement basic optimizeDeps() that returns default options
Browse files Browse the repository at this point in the history
  • Loading branch information
lolmaus committed Oct 4, 2023
1 parent 3a5e794 commit f43e476
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/vite/src/optimize-deps.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export interface OptimizeDeps {
exclude?: string[];
[key: string]: unknown;
}

export function optimizeDeps(): OptimizeDeps {
return {
exclude: ['@embroider/macros'],
};
}
13 changes: 13 additions & 0 deletions packages/vite/tests/optimize-deps.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { optimizeDeps } from '../src/optimize-deps';

describe('optimizeDeps', function () {
test('should produce default output when invoked without arguments', function () {
const actual = optimizeDeps();

const expected = {
exclude: ['@embroider/macros'],
};

expect(actual).toEqual(expected);
});
});

0 comments on commit f43e476

Please sign in to comment.