From fa565ac7b9aa2c7ddb77dca2284011357847983a Mon Sep 17 00:00:00 2001 From: Vladimir Amiorkov Date: Thu, 30 May 2019 13:29:56 +0300 Subject: [PATCH 1/3] release: cut the 0.24.0 release (#916) chore: manually update CHANGELOG for release from 0.22.0 to 0.24.0 --- CHANGELOG.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9ab3fa2..b4331eb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,18 @@ + +# [0.24.0](https://github.com/NativeScript/nativescript-dev-webpack/compare/0.22.0...0.24.0) (2019-05-30) + + +### Bug Fixes + +* 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)) + + +### Features + +* 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)) + + + # [0.22.0](https://github.com/NativeScript/nativescript-dev-webpack/compare/0.21.0...0.22.0) (2019-05-15) From ccbf8de5ca1e01f814d65dc7a60212672922ad47 Mon Sep 17 00:00:00 2001 From: Rosen Vladimirov Date: Tue, 4 Jun 2019 08:38:14 +0300 Subject: [PATCH 2/3] 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. --- templates/webpack.typescript.js | 3 ++- templates/webpack.vue.js | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/webpack.typescript.js b/templates/webpack.typescript.js index 4a3bc35a..6158e01e 100644 --- a/templates/webpack.typescript.js +++ b/templates/webpack.typescript.js @@ -214,7 +214,8 @@ module.exports = env => { transpileOnly: !!hmr, allowTsInNodeModules: true, compilerOptions: { - sourceMap: isAnySourceMapEnabled + sourceMap: isAnySourceMapEnabled, + declaration: false } }, } diff --git a/templates/webpack.vue.js b/templates/webpack.vue.js index 66f13fa3..c8161474 100644 --- a/templates/webpack.vue.js +++ b/templates/webpack.vue.js @@ -209,6 +209,9 @@ module.exports = env => { options: { appendTsSuffixTo: [/\.vue$/], allowTsInNodeModules: true, + compilerOptions: { + declaration: false + } }, }, { From 13981791a361e3591e8973bdfd9a3cf63184c71b Mon Sep 17 00:00:00 2001 From: Dimitar Tachev Date: Wed, 5 Jun 2019 15:54:30 +0300 Subject: [PATCH 3/3] 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) --- templates/webpack.typescript.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/templates/webpack.typescript.js b/templates/webpack.typescript.js index 6158e01e..714dc56a 100644 --- a/templates/webpack.typescript.js +++ b/templates/webpack.typescript.js @@ -211,7 +211,9 @@ module.exports = env => { loader: "ts-loader", options: { configFile: tsConfigPath, - transpileOnly: !!hmr, + // https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#faster-builds + // https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#hot-module-replacement + transpileOnly: true, allowTsInNodeModules: true, compilerOptions: { sourceMap: isAnySourceMapEnabled, @@ -256,6 +258,14 @@ module.exports = env => { }), // Does IPC communication with the {N} CLI to notify events when running in watch mode. new nsWebpack.WatchStateLoggerPlugin(), + // https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#faster-builds + // https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#hot-module-replacement + new ForkTsCheckerWebpackPlugin({ + tsconfig: tsConfigPath, + async: false, + useTypescriptIncrementalApi: true, + memoryLimit: 4096 + }) ], }; @@ -295,12 +305,6 @@ module.exports = env => { if (hmr) { config.plugins.push(new webpack.HotModuleReplacementPlugin()); - - // With HMR ts-loader should run in `transpileOnly` mode, - // so assure type-checking with fork-ts-checker-webpack-plugin - config.plugins.push(new ForkTsCheckerWebpackPlugin({ - tsconfig: tsConfigPath - })); }