Skip to content
This repository has been archived by the owner on Aug 7, 2021. It is now read-only.

Commit

Permalink
fix: stop generating .d.ts on TS compilation (#919)
Browse files Browse the repository at this point in the history
In case `declaration` is set to true in `tsconfig.json` file, the webpack watcher goes in indefinite loop as each change of .ts file leads to generation of new .d.ts files which are also detected by webpack.
To prevent this, ensure declaration is set to false in all compilation cases.
  • Loading branch information
rosen-vladimirov committed Jun 4, 2019
1 parent fa565ac commit ccbf8de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion templates/webpack.typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ module.exports = env => {
transpileOnly: !!hmr,
allowTsInNodeModules: true,
compilerOptions: {
sourceMap: isAnySourceMapEnabled
sourceMap: isAnySourceMapEnabled,
declaration: false
}
},
}
Expand Down
3 changes: 3 additions & 0 deletions templates/webpack.vue.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ module.exports = env => {
options: {
appendTsSuffixTo: [/\.vue$/],
allowTsInNodeModules: true,
compilerOptions: {
declaration: false
}
},
},
{
Expand Down

0 comments on commit ccbf8de

Please sign in to comment.