@omnia/tooling-vue 8.0.152-dev → 8.0.154-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 +5 -3
- package/internal-do-not-import-from-here/vite/hmr/runtime.js +3 -0
- package/internal-do-not-import-from-here/vite/hmr/utils/moduleAnalysis.js +2 -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 +12 -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,8 @@ function toFileGraphId(unknownId) {
|
|
|
36
36
|
id = utils_1.pathUtils.resolveTsPath(id);
|
|
37
37
|
}
|
|
38
38
|
if (path_1.default.isAbsolute(id)) {
|
|
39
|
-
return '.' +
|
|
39
|
+
// return '.' + normalizePath(id.replace(normalizePath(envUtils.getRootDirPath()), ''));
|
|
40
|
+
return '.' + (0, vite_1.normalizePath)(utils_1.pathUtils.normalizeRelativePath(id));
|
|
40
41
|
}
|
|
41
42
|
if (id.startsWith('/')) {
|
|
42
43
|
return '.' + id;
|
|
@@ -50,7 +51,8 @@ function toModuleId(unknownId) {
|
|
|
50
51
|
id = utils_1.pathUtils.resolveTsPath(id);
|
|
51
52
|
}
|
|
52
53
|
if (path_1.default.isAbsolute(id)) {
|
|
53
|
-
return
|
|
54
|
+
// return '.' + normalizePath(id.replace(normalizePath(envUtils.getRootDirPath()), ''));
|
|
55
|
+
return (0, vite_1.normalizePath)(utils_1.pathUtils.normalizeRelativePath(id));
|
|
54
56
|
}
|
|
55
57
|
if (id.startsWith('./')) {
|
|
56
58
|
return id.substring(1);
|
|
@@ -102,6 +102,9 @@ function setupHmrPlugin(options, config) {
|
|
|
102
102
|
const resolver = resolvers.find(resolver => resolver.test(pathname, importer, fileGraph, runtimeContext, fromWorker));
|
|
103
103
|
if (resolver) {
|
|
104
104
|
return resolver.resolve(pathname, importer, fileGraph, runtimeContext, fromWorker);
|
|
105
|
+
// const resolvedPath = await resolver.resolve(pathname, importer, fileGraph, runtimeContext, fromWorker);
|
|
106
|
+
// console.log("resolved path", resolvedPath, pathUtils.normalizeRelativePath(resolvedPath))
|
|
107
|
+
// return pathUtils.normalizeRelativePath(resolvedPath);
|
|
105
108
|
}
|
|
106
109
|
return source;
|
|
107
110
|
},
|
|
@@ -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,8 @@ function resolveRawPath(rawPath, id, external) {
|
|
|
159
158
|
dependencyFilePath = pathUtils.resolveTsPath(rawPath);
|
|
160
159
|
}
|
|
161
160
|
if (dependencyFilePath) {
|
|
162
|
-
dependencyFilePath =
|
|
161
|
+
dependencyFilePath = pathUtils.normalizeRelativePath(dependencyFilePath);
|
|
162
|
+
// dependencyFilePath = dependencyFilePath.replace(normalizePath(envUtils.getRootDirPath()), '');
|
|
163
163
|
if (dependencyFilePath.startsWith('/')) {
|
|
164
164
|
dependencyFilePath = '.' + dependencyFilePath;
|
|
165
165
|
}
|
|
@@ -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,13 @@ 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 =
|
|
19
|
+
// value.compilerOptions.baseUrl = normalizePath(resolvedBaseUrl.replace(envUtils.getRootDirPath(), ''));
|
|
20
|
+
value.compilerOptions.baseUrl = (0, vite_1.normalizePath)(normalizeRelativePath(resolvedBaseUrl));
|
|
19
21
|
_tsConfig = value;
|
|
20
22
|
}
|
|
21
23
|
return _tsConfig;
|
|
@@ -108,7 +110,7 @@ function parseHmrDynamicBundlePath(value) {
|
|
|
108
110
|
}
|
|
109
111
|
exports.parseHmrDynamicBundlePath = parseHmrDynamicBundlePath;
|
|
110
112
|
function parsePhysicalPath(value) {
|
|
111
|
-
value = ensureRelativePath(value)
|
|
113
|
+
value = ensureRelativePath(value);
|
|
112
114
|
if (value.startsWith('/')) {
|
|
113
115
|
value = value.substr(1);
|
|
114
116
|
}
|
|
@@ -218,6 +220,13 @@ function resolveTsPath(importPath) {
|
|
|
218
220
|
return loop();
|
|
219
221
|
}
|
|
220
222
|
exports.resolveTsPath = resolveTsPath;
|
|
223
|
+
function normalizeRelativePath(value) {
|
|
224
|
+
if (value.toLowerCase().replace(/\\/g, "/").indexOf(rootDirPathLowerCase) === 0) {
|
|
225
|
+
return value.substring(rootDirPathLowerCase.length);
|
|
226
|
+
}
|
|
227
|
+
return value;
|
|
228
|
+
}
|
|
229
|
+
exports.normalizeRelativePath = normalizeRelativePath;
|
|
221
230
|
function ensureRelativePath(value) {
|
|
222
231
|
if (path_1.default.isAbsolute(value)) {
|
|
223
232
|
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.154-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.154-dev",
|
|
23
|
+
"@omnia/tooling-composers": "8.0.154-dev",
|
|
24
24
|
"@types/mousetrap": "1.5.34",
|
|
25
25
|
"@types/quill": "1.3.6",
|
|
26
26
|
"@types/zepto": "1.0.29",
|