Skip to content

Commit

Permalink
chore: Added webpack specific tsconfig to exclude tests (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaryt authored Sep 8, 2022
1 parent 30be6d0 commit 7504f22
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"resolveJsonModule": true,
"lib": ["es2017"]
},
"include": ["src/**/*.ts"],
"exclude": ["node_modules", "**/*.d.ts", "**/*.test.ts"],
"include": ["src/**/*.ts", "**/*.test.ts"],
"exclude": ["node_modules", "**/*.d.ts"],
"typedocOptions": {
"entryPoints": ["./src/index.ts"],
"out": "docs"
Expand Down
4 changes: 4 additions & 0 deletions tsconfig.webpack.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "./tsconfig.json",
"exclude": ["node_modules", "**/*.d.ts", "**/*.test.ts"]
}
7 changes: 6 additions & 1 deletion webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ export const config: webpack.Configuration = {
test: (modulePath: string): boolean => {
return modulePath.endsWith('.ts') && !modulePath.endsWith('test.ts');
},
use: 'ts-loader',
use: [
{
loader: 'ts-loader',
options: { configFile: 'tsconfig.webpack.json' },
},
],
exclude: /node_modules/,
},
],
Expand Down

0 comments on commit 7504f22

Please sign in to comment.