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

Commit ccbf8de

Browse files
fix: stop generating .d.ts on TS compilation (#919)
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.
1 parent fa565ac commit ccbf8de

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Diff for: templates/webpack.typescript.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ module.exports = env => {
214214
transpileOnly: !!hmr,
215215
allowTsInNodeModules: true,
216216
compilerOptions: {
217-
sourceMap: isAnySourceMapEnabled
217+
sourceMap: isAnySourceMapEnabled,
218+
declaration: false
218219
}
219220
},
220221
}

Diff for: templates/webpack.vue.js

+3
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@ module.exports = env => {
209209
options: {
210210
appendTsSuffixTo: [/\.vue$/],
211211
allowTsInNodeModules: true,
212+
compilerOptions: {
213+
declaration: false
214+
}
212215
},
213216
},
214217
{

0 commit comments

Comments
 (0)