We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca0cee3 commit 8905654Copy full SHA for 8905654
1 file changed
nativescript.webpack.js
@@ -25,6 +25,21 @@ module.exports = webpack => {
25
webpack.chainWebpack((config, env) => {
26
if (env.unitTesting) {
27
return setupUnitTestBuild(config, env, webpack);
28
+ } else {
29
+ config
30
+ .plugin("IgnorePlugin|unit_tests")
31
+ .use(IgnorePlugin, [{
32
+ checkResource: (resource, context) => {
33
+ if (context === webpack.Utils.platform.getEntryDirPath()) {
34
+ if (/(^\.\/test|\.spec)\.(ts|js)$/.test(resource)) {
35
+ // console.log('ignoring unit test', context, resource);
36
+ return true;
37
+ }
38
39
+ return false;
40
+
41
42
+ }]);
43
}
44
});
45
};
0 commit comments