diff --git a/tsconfig.json b/tsconfig.json index 539fc69..01f7709 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -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" diff --git a/tsconfig.webpack.json b/tsconfig.webpack.json new file mode 100644 index 0000000..cc8e75d --- /dev/null +++ b/tsconfig.webpack.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "exclude": ["node_modules", "**/*.d.ts", "**/*.test.ts"] +} diff --git a/webpack.config.ts b/webpack.config.ts index c32c92b..6348eef 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -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/, }, ],