Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit b632269

Browse files
FatmeFatme
Fatme
authored andcommitted
fix: add support for executing unit tests for vue projects (#839)
1 parent d4ad5fe commit b632269

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Diff for: templates/webpack.vue.js

+15
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,21 @@ module.exports = env => {
253253
],
254254
};
255255

256+
if (unitTesting) {
257+
config.module.rules.push(
258+
{
259+
test: /-page\.js$/,
260+
use: "nativescript-dev-webpack/script-hot-loader"
261+
},
262+
{
263+
test: /\.(html|xml)$/,
264+
use: "nativescript-dev-webpack/markup-hot-loader"
265+
},
266+
267+
{ test: /\.(html|xml)$/, use: "nativescript-dev-webpack/xml-namespace-loader"}
268+
);
269+
}
270+
256271
// Copy the native app resources to the out dir
257272
// only if doing a full build (tns run/build) and not previewing (tns preview)
258273
if (!externals || externals.length === 0) {

0 commit comments

Comments
 (0)