@omnia/tooling-vue 8.0.152-dev → 8.0.153-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/internal-do-not-import-from-here/vite/hmr/graph.js +3 -3
- package/internal-do-not-import-from-here/vite/hmr/runtime.js +1 -1
- package/internal-do-not-import-from-here/vite/hmr/utils/moduleAnalysis.js +1 -2
- package/internal-do-not-import-from-here/vite/hmr/utils/path.d.ts +1 -0
- package/internal-do-not-import-from-here/vite/hmr/utils/path.js +11 -3
- package/internal-do-not-import-from-here/vite/hmr/utils/webpack.js +2 -1
- package/internal-do-not-import-from-here/vite/index.js +1 -0
- package/package.json +3 -3
|
@@ -20,7 +20,7 @@ const initialManifests = [
|
|
|
20
20
|
fx_models_1.OmniaResourceManifests.FxWorkers.toString()
|
|
21
21
|
];
|
|
22
22
|
const esbuildTransformOptions = {
|
|
23
|
-
target: '
|
|
23
|
+
target: 'es2022',
|
|
24
24
|
jsx: 'preserve',
|
|
25
25
|
sourcemap: false,
|
|
26
26
|
legalComments: 'inline'
|
|
@@ -36,7 +36,7 @@ function toFileGraphId(unknownId) {
|
|
|
36
36
|
id = utils_1.pathUtils.resolveTsPath(id);
|
|
37
37
|
}
|
|
38
38
|
if (path_1.default.isAbsolute(id)) {
|
|
39
|
-
return '.' + (0, vite_1.normalizePath)(
|
|
39
|
+
return '.' + (0, vite_1.normalizePath)(utils_1.pathUtils.normalizeRelativePath(id));
|
|
40
40
|
}
|
|
41
41
|
if (id.startsWith('/')) {
|
|
42
42
|
return '.' + id;
|
|
@@ -50,7 +50,7 @@ function toModuleId(unknownId) {
|
|
|
50
50
|
id = utils_1.pathUtils.resolveTsPath(id);
|
|
51
51
|
}
|
|
52
52
|
if (path_1.default.isAbsolute(id)) {
|
|
53
|
-
return (0, vite_1.normalizePath)(
|
|
53
|
+
return (0, vite_1.normalizePath)(utils_1.pathUtils.normalizeRelativePath(id));
|
|
54
54
|
}
|
|
55
55
|
if (id.startsWith('./')) {
|
|
56
56
|
return id.substring(1);
|
|
@@ -101,7 +101,7 @@ function setupHmrPlugin(options, config) {
|
|
|
101
101
|
const fileGraph = graph.getFileGraph(source);
|
|
102
102
|
const resolver = resolvers.find(resolver => resolver.test(pathname, importer, fileGraph, runtimeContext, fromWorker));
|
|
103
103
|
if (resolver) {
|
|
104
|
-
return resolver.resolve(pathname, importer, fileGraph, runtimeContext, fromWorker);
|
|
104
|
+
return utils_1.pathUtils.normalizeRelativePath(await resolver.resolve(pathname, importer, fileGraph, runtimeContext, fromWorker));
|
|
105
105
|
}
|
|
106
106
|
return source;
|
|
107
107
|
},
|
|
@@ -4,7 +4,6 @@ exports.tempFix = exports.replaceWildcardDefaultExport = exports.replaceNameless
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
6
6
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
7
|
-
const vite_1 = require("vite");
|
|
8
7
|
const envUtils = tslib_1.__importStar(require("./env"));
|
|
9
8
|
const pathUtils = tslib_1.__importStar(require("./path"));
|
|
10
9
|
const replacedDefaultVariable = '__default__';
|
|
@@ -159,7 +158,7 @@ function resolveRawPath(rawPath, id, external) {
|
|
|
159
158
|
dependencyFilePath = pathUtils.resolveTsPath(rawPath);
|
|
160
159
|
}
|
|
161
160
|
if (dependencyFilePath) {
|
|
162
|
-
dependencyFilePath =
|
|
161
|
+
dependencyFilePath = pathUtils.normalizeRelativePath(dependencyFilePath);
|
|
163
162
|
if (dependencyFilePath.startsWith('/')) {
|
|
164
163
|
dependencyFilePath = '.' + dependencyFilePath;
|
|
165
164
|
}
|
|
@@ -34,4 +34,5 @@ export declare function modify(value: string): {
|
|
|
34
34
|
};
|
|
35
35
|
export declare function resolveModulePath(modulePath: string, external?: boolean): string;
|
|
36
36
|
export declare function resolveTsPath(importPath: string): string;
|
|
37
|
+
export declare function normalizeRelativePath(value: string): string;
|
|
37
38
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveTsPath = exports.resolveModulePath = exports.modify = exports.parsePhysicalPath = exports.parseHmrDynamicBundlePath = exports.parseHmrEsmPath = exports.parseOmniaBundlePath = exports.isImageFilePath = exports.isPublicDirPath = exports.isNodeModulePath = exports.isTsPath = exports.isJavaScriptSuperset = exports.isSourceCodePath = exports.isEsmPath = exports.isBundlePath = exports.WORKER_IDENTIFIER = exports.HMR_DYNAMIC_BUNDLE_REQUEST = exports.HMR_ESM_REQUEST = exports.OMNIA_BUNDLE_REQUEST = void 0;
|
|
3
|
+
exports.normalizeRelativePath = exports.resolveTsPath = exports.resolveModulePath = exports.modify = exports.parsePhysicalPath = exports.parseHmrDynamicBundlePath = exports.parseHmrEsmPath = exports.parseOmniaBundlePath = exports.isImageFilePath = exports.isPublicDirPath = exports.isNodeModulePath = exports.isTsPath = exports.isJavaScriptSuperset = exports.isSourceCodePath = exports.isEsmPath = exports.isBundlePath = exports.WORKER_IDENTIFIER = exports.HMR_DYNAMIC_BUNDLE_REQUEST = exports.HMR_ESM_REQUEST = exports.OMNIA_BUNDLE_REQUEST = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
6
|
const vite_1 = require("vite");
|
|
@@ -11,11 +11,12 @@ exports.HMR_ESM_REQUEST = '/hmr/esm';
|
|
|
11
11
|
exports.HMR_DYNAMIC_BUNDLE_REQUEST = '/hmr/dynamicbundles';
|
|
12
12
|
exports.WORKER_IDENTIFIER = 'omniaworker';
|
|
13
13
|
let _tsConfig;
|
|
14
|
+
const rootDirPathLowerCase = envUtils.getRootDirPath().toLowerCase().replace(/\\/g, "/");
|
|
14
15
|
function getTsConfig() {
|
|
15
16
|
if (!_tsConfig) {
|
|
16
17
|
const value = require(envUtils.getTsConfigPath());
|
|
17
18
|
const resolvedBaseUrl = path_1.default.join(envUtils.getRootDirPath(), value.compilerOptions.baseUrl);
|
|
18
|
-
value.compilerOptions.baseUrl = (0, vite_1.normalizePath)(resolvedBaseUrl
|
|
19
|
+
value.compilerOptions.baseUrl = (0, vite_1.normalizePath)(normalizeRelativePath(resolvedBaseUrl));
|
|
19
20
|
_tsConfig = value;
|
|
20
21
|
}
|
|
21
22
|
return _tsConfig;
|
|
@@ -108,7 +109,7 @@ function parseHmrDynamicBundlePath(value) {
|
|
|
108
109
|
}
|
|
109
110
|
exports.parseHmrDynamicBundlePath = parseHmrDynamicBundlePath;
|
|
110
111
|
function parsePhysicalPath(value) {
|
|
111
|
-
value = ensureRelativePath(value)
|
|
112
|
+
value = ensureRelativePath(value);
|
|
112
113
|
if (value.startsWith('/')) {
|
|
113
114
|
value = value.substr(1);
|
|
114
115
|
}
|
|
@@ -218,6 +219,13 @@ function resolveTsPath(importPath) {
|
|
|
218
219
|
return loop();
|
|
219
220
|
}
|
|
220
221
|
exports.resolveTsPath = resolveTsPath;
|
|
222
|
+
function normalizeRelativePath(value) {
|
|
223
|
+
if (value.toLowerCase().replace(/\\/g, "/").indexOf(rootDirPathLowerCase) === 0) {
|
|
224
|
+
return value.substring(rootDirPathLowerCase.length);
|
|
225
|
+
}
|
|
226
|
+
return value;
|
|
227
|
+
}
|
|
228
|
+
exports.normalizeRelativePath = normalizeRelativePath;
|
|
221
229
|
function ensureRelativePath(value) {
|
|
222
230
|
if (path_1.default.isAbsolute(value)) {
|
|
223
231
|
value = value.replace(envUtils.getRootDirPath(), '/');
|
|
@@ -5,10 +5,11 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const envUtils = tslib_1.__importStar(require("./env"));
|
|
6
6
|
const bundler = tslib_1.__importStar(require("../../../tasks/bundle"));
|
|
7
7
|
const $ = tslib_1.__importStar(require("../../../variables"));
|
|
8
|
+
const _1 = require(".");
|
|
8
9
|
function createWebpackConfig(entries, option) {
|
|
9
10
|
let configs = [];
|
|
10
11
|
let bundleOptions = bundler.getBuildOption().bundleOptions;
|
|
11
|
-
let outputDir = envUtils.getBundleOutputDirPath().replace(envUtils.getRootDirPath(), '');
|
|
12
|
+
let outputDir = _1.pathUtils.normalizeRelativePath(envUtils.getBundleOutputDirPath()); //envUtils.getBundleOutputDirPath().replace(envUtils.getRootDirPath(), '');
|
|
12
13
|
if (bundleOptions && bundleOptions.commonsChunk) {
|
|
13
14
|
let config = bundler.createVueWebpackConfig(null, entries, outputDir, option);
|
|
14
15
|
config.stats = {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omnia/tooling-vue",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "8.0.
|
|
4
|
+
"version": "8.0.153-dev",
|
|
5
5
|
"description": "Used to bundle and serve manifests web component that build on Vue framework.",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
],
|
|
20
20
|
"author": "Precio Fishbone",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@omnia/fx-models": "8.0.
|
|
23
|
-
"@omnia/tooling-composers": "8.0.
|
|
22
|
+
"@omnia/fx-models": "8.0.153-dev",
|
|
23
|
+
"@omnia/tooling-composers": "8.0.153-dev",
|
|
24
24
|
"@types/mousetrap": "1.5.34",
|
|
25
25
|
"@types/quill": "1.3.6",
|
|
26
26
|
"@types/zepto": "1.0.29",
|