saloe 0.0.11 → 0.0.12
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/dist/vite.cjs.js +5 -6
- package/dist/vite.es.js +5 -5
- package/package.json +1 -1
- package/src/vite.js +6 -5
package/dist/vite.cjs.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const fs = require("fs");
|
|
4
4
|
const path = require("path");
|
|
5
|
-
var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;
|
|
6
5
|
const listFiles = async ({ path: path$1 }) => {
|
|
7
6
|
let allFiles = [];
|
|
8
7
|
try {
|
|
@@ -52,8 +51,8 @@ console.log(A${acumIndex})
|
|
|
52
51
|
})
|
|
53
52
|
);
|
|
54
53
|
};
|
|
55
|
-
const getURLPath = ({ path: path2 }) => new URL(`${path2}`,
|
|
56
|
-
const getInputPaths = async ({ sources }) => {
|
|
54
|
+
const getURLPath = ({ path: path2, metaUrl }) => new URL(`${path2}`, metaUrl).pathname;
|
|
55
|
+
const getInputPaths = async ({ sources, metaUrl }) => {
|
|
57
56
|
var _a;
|
|
58
57
|
try {
|
|
59
58
|
const componentsInfos = await getImportCode({ sources });
|
|
@@ -70,14 +69,14 @@ const getInputPaths = async ({ sources }) => {
|
|
|
70
69
|
if ((componentFilePath == null ? void 0 : componentFilePath.endsWith(".js")) && !(componentFilePath == null ? void 0 : componentFilePath.includes("/actions/"))) return acc;
|
|
71
70
|
const fileName = (_a3 = componentFilePath == null ? void 0 : componentFilePath.split("/")) == null ? void 0 : _a3.pop();
|
|
72
71
|
const componentName = fileName == null ? void 0 : fileName.replace(/\.[^.]+$/, "");
|
|
73
|
-
acc[componentName] = getURLPath({ path: componentFilePath });
|
|
72
|
+
acc[componentName] = getURLPath({ path: componentFilePath, metaUrl });
|
|
74
73
|
return acc;
|
|
75
74
|
}, {})
|
|
76
75
|
};
|
|
77
76
|
return acc1;
|
|
78
77
|
}, {}),
|
|
79
|
-
actionsFilePath: getURLPath({ path: actionsFilePath })
|
|
80
|
-
// 'sw.worker': getURLPath({ path: '/src/sw.worker.js' }),
|
|
78
|
+
actionsFilePath: getURLPath({ path: actionsFilePath, metaUrl })
|
|
79
|
+
// 'sw.worker': getURLPath({ path: '/src/sw.worker.js', metaUrl }),
|
|
81
80
|
};
|
|
82
81
|
return paths;
|
|
83
82
|
} catch (err) {
|
package/dist/vite.es.js
CHANGED
|
@@ -49,8 +49,8 @@ console.log(A${acumIndex})
|
|
|
49
49
|
})
|
|
50
50
|
);
|
|
51
51
|
};
|
|
52
|
-
const getURLPath = ({ path }) => new URL(`${path}`,
|
|
53
|
-
const getInputPaths = async ({ sources }) => {
|
|
52
|
+
const getURLPath = ({ path, metaUrl }) => new URL(`${path}`, metaUrl).pathname;
|
|
53
|
+
const getInputPaths = async ({ sources, metaUrl }) => {
|
|
54
54
|
var _a;
|
|
55
55
|
try {
|
|
56
56
|
const componentsInfos = await getImportCode({ sources });
|
|
@@ -67,14 +67,14 @@ const getInputPaths = async ({ sources }) => {
|
|
|
67
67
|
if ((componentFilePath == null ? void 0 : componentFilePath.endsWith(".js")) && !(componentFilePath == null ? void 0 : componentFilePath.includes("/actions/"))) return acc;
|
|
68
68
|
const fileName = (_a3 = componentFilePath == null ? void 0 : componentFilePath.split("/")) == null ? void 0 : _a3.pop();
|
|
69
69
|
const componentName = fileName == null ? void 0 : fileName.replace(/\.[^.]+$/, "");
|
|
70
|
-
acc[componentName] = getURLPath({ path: componentFilePath });
|
|
70
|
+
acc[componentName] = getURLPath({ path: componentFilePath, metaUrl });
|
|
71
71
|
return acc;
|
|
72
72
|
}, {})
|
|
73
73
|
};
|
|
74
74
|
return acc1;
|
|
75
75
|
}, {}),
|
|
76
|
-
actionsFilePath: getURLPath({ path: actionsFilePath })
|
|
77
|
-
// 'sw.worker': getURLPath({ path: '/src/sw.worker.js' }),
|
|
76
|
+
actionsFilePath: getURLPath({ path: actionsFilePath, metaUrl })
|
|
77
|
+
// 'sw.worker': getURLPath({ path: '/src/sw.worker.js', metaUrl }),
|
|
78
78
|
};
|
|
79
79
|
return paths;
|
|
80
80
|
} catch (err) {
|
package/package.json
CHANGED
package/src/vite.js
CHANGED
|
@@ -69,9 +69,10 @@ const getImportCode = async ({ sources }) => {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
|
|
72
|
-
const getURLPath = ({ path }) => new URL(`${path}`, import.meta.url).pathname
|
|
72
|
+
// const getURLPath = ({ path }) => new URL(`${path}`, import.meta.url).pathname
|
|
73
|
+
const getURLPath = ({ path, metaUrl }) => new URL(`${path}`, metaUrl).pathname
|
|
73
74
|
|
|
74
|
-
const getInputPaths = async ({ sources }) => {
|
|
75
|
+
const getInputPaths = async ({ sources, metaUrl }) => {
|
|
75
76
|
try {
|
|
76
77
|
const componentsInfos = await getImportCode({ sources })
|
|
77
78
|
|
|
@@ -88,14 +89,14 @@ const getInputPaths = async ({ sources }) => {
|
|
|
88
89
|
if (componentFilePath?.endsWith('.js') && !componentFilePath?.includes('/actions/')) return acc
|
|
89
90
|
const fileName = componentFilePath?.split('/')?.pop()
|
|
90
91
|
const componentName = fileName?.replace(/\.[^.]+$/, '')
|
|
91
|
-
acc[componentName] = getURLPath({ path: componentFilePath })
|
|
92
|
+
acc[componentName] = getURLPath({ path: componentFilePath, metaUrl })
|
|
92
93
|
return acc
|
|
93
94
|
}, {})
|
|
94
95
|
}
|
|
95
96
|
return acc1
|
|
96
97
|
}, {}),
|
|
97
|
-
actionsFilePath: getURLPath({ path: actionsFilePath }),
|
|
98
|
-
// 'sw.worker': getURLPath({ path: '/src/sw.worker.js' }),
|
|
98
|
+
actionsFilePath: getURLPath({ path: actionsFilePath, metaUrl }),
|
|
99
|
+
// 'sw.worker': getURLPath({ path: '/src/sw.worker.js', metaUrl }),
|
|
99
100
|
}
|
|
100
101
|
|
|
101
102
|
return paths
|