Skip to content

Commit 7db2266

Browse files
author
VladimirAmiorkov
committed
chore: resolve issue caused by overrding global.__extends
1 parent 5fee430 commit 7db2266

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Diff for: tests/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
"mocha": "6.1.4",
6363
"nativescript-dev-typescript": "next",
6464
"nativescript-dev-webpack": "webpack",
65+
"remove-strict-webpack-plugin": "~0.1.2",
6566
"sinon": "^7.3.2",
6667
"tslint": "^4.5.1",
6768
"typescript": "~3.4.5"

Diff for: tests/webpack.config.js

+10
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
1313
const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin");
1414
const TerserPlugin = require("terser-webpack-plugin");
1515
const { getAngularCompilerPlugin } = require("nativescript-dev-webpack/plugins/NativeScriptAngularCompilerPlugin");
16+
const RemoveStrictPlugin = require( 'remove-strict-webpack-plugin' );
1617
const hashSalt = Date.now().toString();
1718

1819
module.exports = env => {
@@ -34,6 +35,9 @@ module.exports = env => {
3435
const dist = resolve(projectRoot, nsWebpack.getAppPath(platform, projectRoot));
3536
const appResourcesPlatformDir = platform === "android" ? "Android" : "iOS";
3637

38+
// Workaround for CLI issue in version `6.0.0-2019-06-19-13454`
39+
env.unitTesting = true;
40+
3741
const {
3842
// The 'appPath' and 'appResourcesPath' values are fetched from
3943
// the nsconfig.json configuration file
@@ -314,5 +318,11 @@ module.exports = env => {
314318
config.plugins.push(new webpack.HotModuleReplacementPlugin());
315319
}
316320

321+
// Workaround for issue caused by
322+
// `https://github.com/NativeScript/nativescript-angular/blob/f506b3cb047180c7e208b49ab2def690fad6691e/nativescript-angular/http-client/http-client.module.ts#L5-L7
323+
if (unitTesting) {
324+
config.plugins.push(new RemoveStrictPlugin());
325+
}
326+
317327
return config;
318328
};

0 commit comments

Comments
 (0)