vike 0.4.184-commit-7048cc1 → 0.4.184-commit-44e218c
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 +16 -1
- package/dist/cjs/utils/PROJECT_VERSION.js +1 -1
- package/dist/esm/node/plugin/plugins/distFileNames.js +17 -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
|
@@ -34,7 +34,22 @@ function distFileNames() {
|
|
|
34
34
|
// - It's needed for getHash() of fixServerAssets()
|
|
35
35
|
// - Asset URLs should always contain a hash: it's paramount for caching assets.
|
|
36
36
|
// - If rollupOutput.assetFileNames is a function then use a wrapper function to apply the assertUsage()
|
|
37
|
-
(0, utils_js_1.assertUsage)(false, "Setting
|
|
37
|
+
(0, utils_js_1.assertUsage)(false, "Setting Vite's configuration build.rollupOptions.output.assetFileNames is currently forbidden. Reach out if you need to use.");
|
|
38
|
+
}
|
|
39
|
+
{
|
|
40
|
+
const manualChunksOriginal = rollupOutput.manualChunks;
|
|
41
|
+
rollupOutput.manualChunks = function (id, ...args) {
|
|
42
|
+
if (id.endsWith('.css') && id.includes('node_modules'))
|
|
43
|
+
return 'vendor';
|
|
44
|
+
if (manualChunksOriginal) {
|
|
45
|
+
if ((0, utils_js_1.isCallable)(manualChunksOriginal)) {
|
|
46
|
+
manualChunksOriginal.call(this, id, ...args);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
(0, utils_js_1.assertUsage)(false, "The Vite's configuration build.rollupOptions.output.manualChunks must be a function. Reach out if you need to set it to another value.");
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
38
53
|
}
|
|
39
54
|
});
|
|
40
55
|
}
|
|
@@ -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 } from '../utils.js';
|
|
5
|
+
import { assertPosixPath, assert, assertUsage, isArray, isCallable } from '../utils.js';
|
|
6
6
|
import path from 'path';
|
|
7
7
|
import { getAssetsDir } from '../shared/getAssetsDir.js';
|
|
8
8
|
function distFileNames() {
|
|
@@ -29,7 +29,22 @@ function distFileNames() {
|
|
|
29
29
|
// - It's needed for getHash() of fixServerAssets()
|
|
30
30
|
// - Asset URLs should always contain a hash: it's paramount for caching assets.
|
|
31
31
|
// - If rollupOutput.assetFileNames is a function then use a wrapper function to apply the assertUsage()
|
|
32
|
-
assertUsage(false, "Setting
|
|
32
|
+
assertUsage(false, "Setting Vite's configuration build.rollupOptions.output.assetFileNames is currently forbidden. Reach out if you need to use.");
|
|
33
|
+
}
|
|
34
|
+
{
|
|
35
|
+
const manualChunksOriginal = rollupOutput.manualChunks;
|
|
36
|
+
rollupOutput.manualChunks = function (id, ...args) {
|
|
37
|
+
if (id.endsWith('.css') && id.includes('node_modules'))
|
|
38
|
+
return 'vendor';
|
|
39
|
+
if (manualChunksOriginal) {
|
|
40
|
+
if (isCallable(manualChunksOriginal)) {
|
|
41
|
+
manualChunksOriginal.call(this, id, ...args);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
assertUsage(false, "The Vite's configuration build.rollupOptions.output.manualChunks must be a function. Reach out if you need to set it to another value.");
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
33
48
|
}
|
|
34
49
|
});
|
|
35
50
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PROJECT_VERSION: "0.4.184-commit-
|
|
1
|
+
export declare const PROJECT_VERSION: "0.4.184-commit-44e218c";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Automatically updated by @brillout/release-me
|
|
2
|
-
export const PROJECT_VERSION = '0.4.184-commit-
|
|
2
|
+
export const PROJECT_VERSION = '0.4.184-commit-44e218c';
|