1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const tslib_1 = require("tslib");
|
4 | const path_1 = tslib_1.__importDefault(require("path"));
|
5 | exports.getBaseDir = (pathString, publicPath) => {
|
6 | if (!publicPath || publicPath === "/") {
|
7 | return pathString;
|
8 | }
|
9 | const relativePath = path_1.default.resolve(publicPath)
|
10 | .split("/")
|
11 | .filter((item) => item.length)
|
12 | .map(() => "..")
|
13 | .join("/");
|
14 | return path_1.default.join(pathString, relativePath);
|
15 | };
|