Skip to content

Commit

Permalink
Fixed ts-loader config
Browse files Browse the repository at this point in the history
Excluding test files
see: TypeStrong/ts-loader#544
  • Loading branch information
tomazy committed Aug 27, 2018
1 parent e1245ae commit 7641954
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
12 changes: 12 additions & 0 deletions tsconfig.webpack.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

{
"extends": "./tsconfig",
"compilerOptions": {
"sourceMap": true
},
"exclude": [
"src/**/*.test.ts",
"src/**/*.test.tsx",
"node_modules"
]
}
5 changes: 4 additions & 1 deletion webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ module.exports = {
module: {
rules: [{
test: /\.tsx?$/,
loader: 'ts-loader'
loader: 'ts-loader',
options: {
configFile: 'tsconfig.webpack.json'
}
}]
},
plugins: [
Expand Down

1 comment on commit 7641954

@nerdmax
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, actually you can just update your ts-loader to 5.1.1 and it will fix the issue. It helped me by updating ts-loader.

Please sign in to comment.