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

Commit 7135f5e

Browse files
committed
refactor: get absolute path for context
1 parent eb4b8bc commit 7135f5e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/utils.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const os = require("os");
2+
const path = require("path");
23

34
const { getProjectDir, getWebpackConfig } = require("../projectHelpers");
45

@@ -13,8 +14,9 @@ function getCompilationContext(env) {
1314
const projectDir = getProjectDir();
1415
const config = getWebpackConfig(projectDir, env);
1516
const context = config.context || projectDir;
17+
const absolutePathToContext = path.resolve(context);
1618

17-
return context;
19+
return absolutePathToContext;
1820
}
1921

2022
function shouldSnapshot($mobileHelper, config) {

0 commit comments

Comments
 (0)