Skip to content

Commit 1f2231c

Browse files
committed
fix: pass appPath to the env from karma.conf.js
Two different webpack compilations are started on `tns test` command - the one from `karma-webpack` and the second one from `nativescript-dev-webpack`. As the karma's webpack doesn't provide appPath to the env and there is a hardcoded `appPath` inside `webpack.config.js` (to `src` for example), it works only with that hardcoded path. Rel to: #5070
1 parent 72a4cd5 commit 1f2231c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

resources/test/karma.conf.js

+1
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ function setWebpack(config, options) {
9999
const env = {};
100100
env[config.platform] = true;
101101
env.sourceMap = config.debugBrk;
102+
env.appPath = config._NS && config._NS.options && config._NS.options.appDirectoryRelativePath;
102103
options.webpack = require('./webpack.config')(env);
103104
delete options.webpack.entry;
104105
delete options.webpack.output.libraryTarget;

0 commit comments

Comments
 (0)