From b6322693ee46d963e192622e3d25df544e39de42 Mon Sep 17 00:00:00 2001 From: Fatme Date: Fri, 22 Mar 2019 00:38:15 +0200 Subject: [PATCH] fix: add support for executing unit tests for vue projects (#839) --- templates/webpack.vue.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/templates/webpack.vue.js b/templates/webpack.vue.js index 3ed688de..3361cc3d 100644 --- a/templates/webpack.vue.js +++ b/templates/webpack.vue.js @@ -253,6 +253,21 @@ module.exports = env => { ], }; + if (unitTesting) { + config.module.rules.push( + { + test: /-page\.js$/, + use: "nativescript-dev-webpack/script-hot-loader" + }, + { + test: /\.(html|xml)$/, + use: "nativescript-dev-webpack/markup-hot-loader" + }, + + { test: /\.(html|xml)$/, use: "nativescript-dev-webpack/xml-namespace-loader"} + ); + } + // Copy the native app resources to the out dir // only if doing a full build (tns run/build) and not previewing (tns preview) if (!externals || externals.length === 0) {