vike 0.4.189-commit-6dfac95 → 0.4.189
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/cjs/node/plugin/plugins/distFileNames.js +7 -13
- package/dist/cjs/utils/PROJECT_VERSION.js +1 -1
- package/dist/esm/node/plugin/plugins/distFileNames.js +8 -14
- package/dist/esm/utils/PROJECT_VERSION.d.ts +1 -1
- package/dist/esm/utils/PROJECT_VERSION.js +1 -1
- package/dist/esm/utils/projectInfo.d.ts +1 -1
- package/package.json +1 -1
|
@@ -53,8 +53,7 @@ function distFileNames() {
|
|
|
53
53
|
}
|
|
54
54
|
// Disable CSS bundling to workaround https://github.com/vikejs/vike/issues/1815
|
|
55
55
|
if (id.endsWith('.css')) {
|
|
56
|
-
|
|
57
|
-
if (id.startsWith(userRootDir)) {
|
|
56
|
+
if ((0, utils_js_1.isFilePathAbsolute)(id)) {
|
|
58
57
|
(0, utils_js_1.assertPosixPath)(id);
|
|
59
58
|
(0, getFilePath_js_1.assertModuleId)(id);
|
|
60
59
|
let name;
|
|
@@ -66,10 +65,10 @@ function distFileNames() {
|
|
|
66
65
|
const filePath = (0, getFilePath_js_1.getModuleFilePathAbsolute)(id, config);
|
|
67
66
|
name = filePath;
|
|
68
67
|
name = name.split('.').slice(0, -1).join('.'); // remove file extension
|
|
69
|
-
name = name.split('/').
|
|
68
|
+
name = name.split('/').join('_');
|
|
70
69
|
}
|
|
71
70
|
// Make fileHash the same between local development and CI
|
|
72
|
-
const idStable = path_1.default.posix.relative(
|
|
71
|
+
const idStable = path_1.default.posix.relative(config.root, id);
|
|
73
72
|
// Don't remove `?` queries because each `id` should belong to a unique bundle.
|
|
74
73
|
const hash = getIdHash(idStable);
|
|
75
74
|
return `${name}-${hash}`;
|
|
@@ -77,17 +76,12 @@ function distFileNames() {
|
|
|
77
76
|
else {
|
|
78
77
|
let name;
|
|
79
78
|
const isVirtualModule = id.match(/virtual:([^:]+):/);
|
|
80
|
-
if (isVirtualModule) {
|
|
81
|
-
name =
|
|
82
|
-
(0, utils_js_1.assert)(name);
|
|
83
|
-
}
|
|
84
|
-
else if (
|
|
85
|
-
// https://github.com/vikejs/vike/issues/1818#issuecomment-2298478321
|
|
86
|
-
id.startsWith('/__uno')) {
|
|
87
|
-
name = 'uno';
|
|
79
|
+
if (!isVirtualModule) {
|
|
80
|
+
name = 'style';
|
|
88
81
|
}
|
|
89
82
|
else {
|
|
90
|
-
name =
|
|
83
|
+
name = isVirtualModule[1];
|
|
84
|
+
(0, utils_js_1.assert)(name);
|
|
91
85
|
}
|
|
92
86
|
const hash = getIdHash(id);
|
|
93
87
|
return `${name}-${hash}`;
|
|
@@ -2,7 +2,7 @@ export { distFileNames };
|
|
|
2
2
|
// Attempt to preserve file structure of `.page.js` files:
|
|
3
3
|
// - https://github.com/vikejs/vike/commit/11a4c49e5403aa7c37c8020c462b499425b41854
|
|
4
4
|
// - Blocker: https://github.com/rollup/rollup/issues/4724
|
|
5
|
-
import { assertPosixPath, assert, assertUsage, isArray, isCallable } from '../utils.js';
|
|
5
|
+
import { assertPosixPath, assert, assertUsage, isArray, isCallable, isFilePathAbsolute } from '../utils.js';
|
|
6
6
|
import path from 'path';
|
|
7
7
|
import crypto from 'crypto';
|
|
8
8
|
import { getAssetsDir } from '../shared/getAssetsDir.js';
|
|
@@ -48,8 +48,7 @@ function distFileNames() {
|
|
|
48
48
|
}
|
|
49
49
|
// Disable CSS bundling to workaround https://github.com/vikejs/vike/issues/1815
|
|
50
50
|
if (id.endsWith('.css')) {
|
|
51
|
-
|
|
52
|
-
if (id.startsWith(userRootDir)) {
|
|
51
|
+
if (isFilePathAbsolute(id)) {
|
|
53
52
|
assertPosixPath(id);
|
|
54
53
|
assertModuleId(id);
|
|
55
54
|
let name;
|
|
@@ -61,10 +60,10 @@ function distFileNames() {
|
|
|
61
60
|
const filePath = getModuleFilePathAbsolute(id, config);
|
|
62
61
|
name = filePath;
|
|
63
62
|
name = name.split('.').slice(0, -1).join('.'); // remove file extension
|
|
64
|
-
name = name.split('/').
|
|
63
|
+
name = name.split('/').join('_');
|
|
65
64
|
}
|
|
66
65
|
// Make fileHash the same between local development and CI
|
|
67
|
-
const idStable = path.posix.relative(
|
|
66
|
+
const idStable = path.posix.relative(config.root, id);
|
|
68
67
|
// Don't remove `?` queries because each `id` should belong to a unique bundle.
|
|
69
68
|
const hash = getIdHash(idStable);
|
|
70
69
|
return `${name}-${hash}`;
|
|
@@ -72,17 +71,12 @@ function distFileNames() {
|
|
|
72
71
|
else {
|
|
73
72
|
let name;
|
|
74
73
|
const isVirtualModule = id.match(/virtual:([^:]+):/);
|
|
75
|
-
if (isVirtualModule) {
|
|
76
|
-
name =
|
|
77
|
-
assert(name);
|
|
78
|
-
}
|
|
79
|
-
else if (
|
|
80
|
-
// https://github.com/vikejs/vike/issues/1818#issuecomment-2298478321
|
|
81
|
-
id.startsWith('/__uno')) {
|
|
82
|
-
name = 'uno';
|
|
74
|
+
if (!isVirtualModule) {
|
|
75
|
+
name = 'style';
|
|
83
76
|
}
|
|
84
77
|
else {
|
|
85
|
-
name =
|
|
78
|
+
name = isVirtualModule[1];
|
|
79
|
+
assert(name);
|
|
86
80
|
}
|
|
87
81
|
const hash = getIdHash(id);
|
|
88
82
|
return `${name}-${hash}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PROJECT_VERSION: "0.4.189
|
|
1
|
+
export declare const PROJECT_VERSION: "0.4.189";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Automatically updated by @brillout/release-me
|
|
2
|
-
export const PROJECT_VERSION = '0.4.189
|
|
2
|
+
export const PROJECT_VERSION = '0.4.189';
|