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

Commit 545290d

Browse files
author
Fatme
authored
chore: merge release into master (#928)
* release: cut the 0.24.0 release (#916) chore: manually update CHANGELOG for release from 0.22.0 to 0.24.0 * 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. * fix: move the type check to a child process in order to make it faster in bigger apps and unify the hmr and no-hmr experience. (#926)
1 parent ae9cb8e commit 545290d

File tree

3 files changed

+31
-8
lines changed

3 files changed

+31
-8
lines changed

CHANGELOG.md

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
<a name="0.24.0"></a>
2+
# [0.24.0](https://github.com/NativeScript/nativescript-dev-webpack/compare/0.22.0...0.24.0) (2019-05-30)
3+
4+
5+
### Bug Fixes
6+
7+
* import the workaroundResolve funciton based on the Angular version (it was moved from compiler_host to utils in Angular 8) ([#904](https://github.com/NativeScript/nativescript-dev-webpack/pull/904)) ([56224a8](https://github.com/NativeScript/nativescript-dev-webpack/commit/56224a898b46fc8542f8b5928c52e9e4cb6022e2))
8+
9+
10+
### Features
11+
12+
* update deps to Angular 8.0.0 deps ([#904](https://github.com/NativeScript/nativescript-dev-webpack/pull/904)) ([d6afb74](https://github.com/NativeScript/nativescript-dev-webpack/commit/d6afb7436585d41c4188a2373d376f2b51bc541e))
13+
14+
15+
116
<a name="0.22.0"></a>
217
# [0.22.0](https://github.com/NativeScript/nativescript-dev-webpack/compare/0.21.0...0.22.0) (2019-05-15)
318

templates/webpack.typescript.js

+13-8
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,13 @@ module.exports = env => {
211211
loader: "ts-loader",
212212
options: {
213213
configFile: tsConfigPath,
214-
transpileOnly: !!hmr,
214+
// https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#faster-builds
215+
// https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#hot-module-replacement
216+
transpileOnly: true,
215217
allowTsInNodeModules: true,
216218
compilerOptions: {
217-
sourceMap: isAnySourceMapEnabled
219+
sourceMap: isAnySourceMapEnabled,
220+
declaration: false
218221
}
219222
},
220223
}
@@ -245,6 +248,14 @@ module.exports = env => {
245248
}),
246249
// Does IPC communication with the {N} CLI to notify events when running in watch mode.
247250
new nsWebpack.WatchStateLoggerPlugin(),
251+
// https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#faster-builds
252+
// https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#hot-module-replacement
253+
new ForkTsCheckerWebpackPlugin({
254+
tsconfig: tsConfigPath,
255+
async: false,
256+
useTypescriptIncrementalApi: true,
257+
memoryLimit: 4096
258+
})
248259
],
249260
};
250261

@@ -284,12 +295,6 @@ module.exports = env => {
284295

285296
if (hmr) {
286297
config.plugins.push(new webpack.HotModuleReplacementPlugin());
287-
288-
// With HMR ts-loader should run in `transpileOnly` mode,
289-
// so assure type-checking with fork-ts-checker-webpack-plugin
290-
config.plugins.push(new ForkTsCheckerWebpackPlugin({
291-
tsconfig: tsConfigPath
292-
}));
293298
}
294299

295300

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)