vike 0.4.188-commit-373ae21 → 0.4.189-commit-6dfac95
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 +13 -7
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.js +2 -2
- package/dist/cjs/utils/PROJECT_VERSION.js +1 -1
- package/dist/esm/node/plugin/plugins/distFileNames.js +14 -8
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.js +2 -2
- 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,7 +53,8 @@ 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
|
-
|
|
56
|
+
const userRootDir = config.root;
|
|
57
|
+
if (id.startsWith(userRootDir)) {
|
|
57
58
|
(0, utils_js_1.assertPosixPath)(id);
|
|
58
59
|
(0, getFilePath_js_1.assertModuleId)(id);
|
|
59
60
|
let name;
|
|
@@ -65,10 +66,10 @@ function distFileNames() {
|
|
|
65
66
|
const filePath = (0, getFilePath_js_1.getModuleFilePathAbsolute)(id, config);
|
|
66
67
|
name = filePath;
|
|
67
68
|
name = name.split('.').slice(0, -1).join('.'); // remove file extension
|
|
68
|
-
name = name.split('/').join('_');
|
|
69
|
+
name = name.split('/').filter(Boolean).join('_');
|
|
69
70
|
}
|
|
70
71
|
// Make fileHash the same between local development and CI
|
|
71
|
-
const idStable = path_1.default.posix.relative(
|
|
72
|
+
const idStable = path_1.default.posix.relative(userRootDir, id);
|
|
72
73
|
// Don't remove `?` queries because each `id` should belong to a unique bundle.
|
|
73
74
|
const hash = getIdHash(idStable);
|
|
74
75
|
return `${name}-${hash}`;
|
|
@@ -76,13 +77,18 @@ function distFileNames() {
|
|
|
76
77
|
else {
|
|
77
78
|
let name;
|
|
78
79
|
const isVirtualModule = id.match(/virtual:([^:]+):/);
|
|
79
|
-
if (
|
|
80
|
-
name = 'style';
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
80
|
+
if (isVirtualModule) {
|
|
83
81
|
name = isVirtualModule[1];
|
|
84
82
|
(0, utils_js_1.assert)(name);
|
|
85
83
|
}
|
|
84
|
+
else if (
|
|
85
|
+
// https://github.com/vikejs/vike/issues/1818#issuecomment-2298478321
|
|
86
|
+
id.startsWith('/__uno')) {
|
|
87
|
+
name = 'uno';
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
name = 'style';
|
|
91
|
+
}
|
|
86
92
|
const hash = getIdHash(id);
|
|
87
93
|
return `${name}-${hash}`;
|
|
88
94
|
}
|
|
@@ -244,7 +244,7 @@ async function loadVikeConfig(userRootDir, outDirRoot, isDev, crawlWithGit) {
|
|
|
244
244
|
.filter(([_pageId, interfaceFiles]) => isDefiningPage(interfaceFiles))
|
|
245
245
|
.map(async ([locationId]) => {
|
|
246
246
|
const interfaceFilesRelevant = getInterfaceFilesRelevant(interfaceFilesByLocationId, locationId);
|
|
247
|
-
const interfaceFilesRelevantList = Object.values(
|
|
247
|
+
const interfaceFilesRelevantList = Object.values(interfaceFilesRelevant).flat(1);
|
|
248
248
|
(0, assertExtensions_js_1.assertExtensionsPeerDependencies)(interfaceFilesRelevantList);
|
|
249
249
|
const configDefinitions = getConfigDefinitions(interfaceFilesRelevant);
|
|
250
250
|
// Load value files of custom config-only configs
|
|
@@ -296,7 +296,7 @@ async function loadVikeConfig(userRootDir, outDirRoot, isDev, crawlWithGit) {
|
|
|
296
296
|
// - This assertUsage() message is slightly better: use this one for getGlobalConfigs()
|
|
297
297
|
// Global configs should be defined at global locations
|
|
298
298
|
function assertUsageGlobalConfigs(interfaceFilesRelevantList, configDefinitions, interfaceFilesByLocationId) {
|
|
299
|
-
interfaceFilesRelevantList.forEach(
|
|
299
|
+
interfaceFilesRelevantList.forEach((interfaceFile) => {
|
|
300
300
|
const configNames = [];
|
|
301
301
|
if (interfaceFile.isValueFile) {
|
|
302
302
|
configNames.push(interfaceFile.configName);
|
|
@@ -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
|
|
5
|
+
import { assertPosixPath, assert, assertUsage, isArray, isCallable } from '../utils.js';
|
|
6
6
|
import path from 'path';
|
|
7
7
|
import crypto from 'crypto';
|
|
8
8
|
import { getAssetsDir } from '../shared/getAssetsDir.js';
|
|
@@ -48,7 +48,8 @@ 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
|
-
|
|
51
|
+
const userRootDir = config.root;
|
|
52
|
+
if (id.startsWith(userRootDir)) {
|
|
52
53
|
assertPosixPath(id);
|
|
53
54
|
assertModuleId(id);
|
|
54
55
|
let name;
|
|
@@ -60,10 +61,10 @@ function distFileNames() {
|
|
|
60
61
|
const filePath = getModuleFilePathAbsolute(id, config);
|
|
61
62
|
name = filePath;
|
|
62
63
|
name = name.split('.').slice(0, -1).join('.'); // remove file extension
|
|
63
|
-
name = name.split('/').join('_');
|
|
64
|
+
name = name.split('/').filter(Boolean).join('_');
|
|
64
65
|
}
|
|
65
66
|
// Make fileHash the same between local development and CI
|
|
66
|
-
const idStable = path.posix.relative(
|
|
67
|
+
const idStable = path.posix.relative(userRootDir, id);
|
|
67
68
|
// Don't remove `?` queries because each `id` should belong to a unique bundle.
|
|
68
69
|
const hash = getIdHash(idStable);
|
|
69
70
|
return `${name}-${hash}`;
|
|
@@ -71,13 +72,18 @@ function distFileNames() {
|
|
|
71
72
|
else {
|
|
72
73
|
let name;
|
|
73
74
|
const isVirtualModule = id.match(/virtual:([^:]+):/);
|
|
74
|
-
if (
|
|
75
|
-
name = 'style';
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
75
|
+
if (isVirtualModule) {
|
|
78
76
|
name = isVirtualModule[1];
|
|
79
77
|
assert(name);
|
|
80
78
|
}
|
|
79
|
+
else if (
|
|
80
|
+
// https://github.com/vikejs/vike/issues/1818#issuecomment-2298478321
|
|
81
|
+
id.startsWith('/__uno')) {
|
|
82
|
+
name = 'uno';
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
name = 'style';
|
|
86
|
+
}
|
|
81
87
|
const hash = getIdHash(id);
|
|
82
88
|
return `${name}-${hash}`;
|
|
83
89
|
}
|
|
@@ -240,7 +240,7 @@ async function loadVikeConfig(userRootDir, outDirRoot, isDev, crawlWithGit) {
|
|
|
240
240
|
.filter(([_pageId, interfaceFiles]) => isDefiningPage(interfaceFiles))
|
|
241
241
|
.map(async ([locationId]) => {
|
|
242
242
|
const interfaceFilesRelevant = getInterfaceFilesRelevant(interfaceFilesByLocationId, locationId);
|
|
243
|
-
const interfaceFilesRelevantList = Object.values(
|
|
243
|
+
const interfaceFilesRelevantList = Object.values(interfaceFilesRelevant).flat(1);
|
|
244
244
|
assertExtensionsPeerDependencies(interfaceFilesRelevantList);
|
|
245
245
|
const configDefinitions = getConfigDefinitions(interfaceFilesRelevant);
|
|
246
246
|
// Load value files of custom config-only configs
|
|
@@ -292,7 +292,7 @@ async function loadVikeConfig(userRootDir, outDirRoot, isDev, crawlWithGit) {
|
|
|
292
292
|
// - This assertUsage() message is slightly better: use this one for getGlobalConfigs()
|
|
293
293
|
// Global configs should be defined at global locations
|
|
294
294
|
function assertUsageGlobalConfigs(interfaceFilesRelevantList, configDefinitions, interfaceFilesByLocationId) {
|
|
295
|
-
interfaceFilesRelevantList.forEach(
|
|
295
|
+
interfaceFilesRelevantList.forEach((interfaceFile) => {
|
|
296
296
|
const configNames = [];
|
|
297
297
|
if (interfaceFile.isValueFile) {
|
|
298
298
|
configNames.push(interfaceFile.configName);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PROJECT_VERSION: "0.4.
|
|
1
|
+
export declare const PROJECT_VERSION: "0.4.189-commit-6dfac95";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Automatically updated by @brillout/release-me
|
|
2
|
-
export const PROJECT_VERSION = '0.4.
|
|
2
|
+
export const PROJECT_VERSION = '0.4.189-commit-6dfac95';
|