vike 0.4.162-commit-49fe40c → 0.4.162-commit-8995471
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.
|
@@ -66,24 +66,28 @@ function buildConfig() {
|
|
|
66
66
|
buildStart() {
|
|
67
67
|
assertNodeEnv();
|
|
68
68
|
},
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
69
|
+
writeBundle: {
|
|
70
|
+
order: 'post',
|
|
71
|
+
sequential: true,
|
|
72
|
+
async handler(options, bundle) {
|
|
73
|
+
if (isSsrBuild) {
|
|
74
|
+
// Ideally we'd move dist/_temp_manifest.json to dist/server/client-assets.json instead of dist/assets.json
|
|
75
|
+
// - But we can't because there is no guarentee whether dist/server/ is generated before or after dist/client/ (generating dist/server/ after dist/client/ erases dist/server/client-assets.json)
|
|
76
|
+
// - We'll able to do so once we replace `$ vite build` with `$ vike build`
|
|
77
|
+
const assetsJsonFilePath = path_1.default.posix.join(outDirs.outDirRoot, 'assets.json');
|
|
78
|
+
const clientManifestFilePath = path_1.default.posix.join(outDirs.outDirClient, manifestTempFile);
|
|
79
|
+
const serverManifestFilePath = path_1.default.posix.join(outDirs.outDirServer, manifestTempFile);
|
|
80
|
+
if (!isServerAssetsFixEnabled) {
|
|
81
|
+
await promises_1.default.copyFile(clientManifestFilePath, assetsJsonFilePath);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
const clientManifestMod = await (0, fixServerAssets_js_1.fixServerAssets)(outDirs);
|
|
85
|
+
await promises_1.default.writeFile(assetsJsonFilePath, JSON.stringify(clientManifestMod, null, 2), 'utf-8');
|
|
86
|
+
}
|
|
87
|
+
await promises_1.default.rm(clientManifestFilePath);
|
|
88
|
+
await promises_1.default.rm(serverManifestFilePath);
|
|
89
|
+
await (0, index_js_1.set_constant_ASSETS_MAP)(options, bundle);
|
|
83
90
|
}
|
|
84
|
-
await promises_1.default.rm(clientManifestFilePath);
|
|
85
|
-
await promises_1.default.rm(serverManifestFilePath);
|
|
86
|
-
await (0, index_js_1.set_constant_ASSETS_MAP)(options, bundle);
|
|
87
91
|
}
|
|
88
92
|
}
|
|
89
93
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PROJECT_VERSION = exports.projectInfo = void 0;
|
|
4
4
|
const assertSingleInstance_js_1 = require("./assertSingleInstance.js");
|
|
5
|
-
const PROJECT_VERSION = '0.4.162-commit-
|
|
5
|
+
const PROJECT_VERSION = '0.4.162-commit-8995471';
|
|
6
6
|
exports.PROJECT_VERSION = PROJECT_VERSION;
|
|
7
7
|
const projectInfo = {
|
|
8
8
|
projectName: 'Vike',
|
|
@@ -63,24 +63,28 @@ function buildConfig() {
|
|
|
63
63
|
buildStart() {
|
|
64
64
|
assertNodeEnv();
|
|
65
65
|
},
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
66
|
+
writeBundle: {
|
|
67
|
+
order: 'post',
|
|
68
|
+
sequential: true,
|
|
69
|
+
async handler(options, bundle) {
|
|
70
|
+
if (isSsrBuild) {
|
|
71
|
+
// Ideally we'd move dist/_temp_manifest.json to dist/server/client-assets.json instead of dist/assets.json
|
|
72
|
+
// - But we can't because there is no guarentee whether dist/server/ is generated before or after dist/client/ (generating dist/server/ after dist/client/ erases dist/server/client-assets.json)
|
|
73
|
+
// - We'll able to do so once we replace `$ vite build` with `$ vike build`
|
|
74
|
+
const assetsJsonFilePath = path.posix.join(outDirs.outDirRoot, 'assets.json');
|
|
75
|
+
const clientManifestFilePath = path.posix.join(outDirs.outDirClient, manifestTempFile);
|
|
76
|
+
const serverManifestFilePath = path.posix.join(outDirs.outDirServer, manifestTempFile);
|
|
77
|
+
if (!isServerAssetsFixEnabled) {
|
|
78
|
+
await fs.copyFile(clientManifestFilePath, assetsJsonFilePath);
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
const clientManifestMod = await fixServerAssets(outDirs);
|
|
82
|
+
await fs.writeFile(assetsJsonFilePath, JSON.stringify(clientManifestMod, null, 2), 'utf-8');
|
|
83
|
+
}
|
|
84
|
+
await fs.rm(clientManifestFilePath);
|
|
85
|
+
await fs.rm(serverManifestFilePath);
|
|
86
|
+
await set_constant_ASSETS_MAP(options, bundle);
|
|
80
87
|
}
|
|
81
|
-
await fs.rm(clientManifestFilePath);
|
|
82
|
-
await fs.rm(serverManifestFilePath);
|
|
83
|
-
await set_constant_ASSETS_MAP(options, bundle);
|
|
84
88
|
}
|
|
85
89
|
}
|
|
86
90
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { projectInfo };
|
|
2
2
|
export { PROJECT_VERSION };
|
|
3
|
-
declare const PROJECT_VERSION: "0.4.162-commit-
|
|
3
|
+
declare const PROJECT_VERSION: "0.4.162-commit-8995471";
|
|
4
4
|
declare const projectInfo: {
|
|
5
5
|
projectName: "Vike";
|
|
6
|
-
projectVersion: "0.4.162-commit-
|
|
6
|
+
projectVersion: "0.4.162-commit-8995471";
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { projectInfo };
|
|
2
2
|
export { PROJECT_VERSION };
|
|
3
3
|
import { onProjectInfo } from './assertSingleInstance.js';
|
|
4
|
-
const PROJECT_VERSION = '0.4.162-commit-
|
|
4
|
+
const PROJECT_VERSION = '0.4.162-commit-8995471';
|
|
5
5
|
const projectInfo = {
|
|
6
6
|
projectName: 'Vike',
|
|
7
7
|
projectVersion: PROJECT_VERSION
|