fix(webpack): use async type-checking in watch mode

This commit is contained in:
rigor789
2021-08-03 15:41:49 +02:00
parent 5a3a35d376
commit 5309f2d0a7
10 changed files with 62 additions and 22 deletions

View File

@ -186,7 +186,7 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
paths.indexOf('@nativescript/core/globals/index.js')
] = polyfillsPath;
// replace paths with the update paths
// replace paths with the updated paths
config.entry('bundle').clear().merge(paths);
}
}

View File

@ -233,11 +233,7 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
.plugin('ForkTsCheckerWebpackPlugin')
.use(ForkTsCheckerWebpackPlugin, [
{
// If we use "async" errors compiling typescript will be ignored by
// WebPack (we will send the "compilation" message back to the CLI,
// and the process exit code will be zero), therefore we will end
// up with a broken build
async: false,
async: !!env.watch,
typescript: {
memoryLimit: 4096,
},