vike 0.4.149-commit-d815556 → 0.4.149-commit-19b2220
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/importUserCode/index.js +3 -1
- package/dist/cjs/node/runtime/renderPage/getPageAssets/retrieveAssetsDev.js +13 -5
- package/dist/cjs/utils/projectInfo.js +1 -1
- package/dist/esm/node/plugin/plugins/importUserCode/index.js +3 -1
- package/dist/esm/node/runtime/renderPage/getPageAssets/retrieveAssetsDev.js +13 -5
- package/dist/esm/utils/projectInfo.d.ts +2 -2
- package/dist/esm/utils/projectInfo.js +1 -1
- package/package.json +1 -1
|
@@ -111,7 +111,9 @@ function handleHotUpdate(ctx, config, configVike) {
|
|
|
111
111
|
return;
|
|
112
112
|
}
|
|
113
113
|
if (isVikeConfig) {
|
|
114
|
-
|
|
114
|
+
/* Tailwind breaks this assertion, see https://github.com/vikejs/vike/discussions/1330#discussioncomment-7787238
|
|
115
|
+
assert(!isViteModule)
|
|
116
|
+
*/
|
|
115
117
|
reloadConfig(file, config, configVike, 'modified');
|
|
116
118
|
const virtualModules = getVirtualModules(server);
|
|
117
119
|
return virtualModules;
|
|
@@ -40,13 +40,21 @@ function collectCss(mod, styleUrls, visitedModules, importer) {
|
|
|
40
40
|
if (mod.url.startsWith('/')) {
|
|
41
41
|
styleUrls.add(mod.url);
|
|
42
42
|
}
|
|
43
|
+
else if (mod.url.startsWith('\0')) {
|
|
44
|
+
// Virtual modules
|
|
45
|
+
// - https://vitejs.dev/guide/api-plugin.html#virtual-modules-convention
|
|
46
|
+
// - I believe some Vite plugins don't respect the \0 virtual module convention. What should we do then?
|
|
47
|
+
// - https://github.com/vikejs/vike/issues/1327
|
|
48
|
+
// - https://github.com/vikejs/vike/commit/3f7b9916dddc84e29e2c20d2b0df7211b6f1acbd
|
|
49
|
+
styleUrls.add(`/@id/${mod.url.substring(1)}`);
|
|
50
|
+
}
|
|
43
51
|
else {
|
|
44
|
-
//
|
|
45
|
-
|
|
46
|
-
// - Reproduction: https://github.com/vikejs/vike/issues/479
|
|
47
|
-
// - Possible workaround: `<script>import 'virtual-module.css'</script>`
|
|
48
|
-
// logModule(mod)
|
|
52
|
+
// Is this useful? Maybe for virtual modules that don't respect the \0 virtual module convention?
|
|
53
|
+
styleUrls.add(`/@id/${mod.url}`);
|
|
49
54
|
}
|
|
55
|
+
/* Debug:
|
|
56
|
+
logModule(mod)
|
|
57
|
+
//*/
|
|
50
58
|
}
|
|
51
59
|
mod.importedModules.forEach((dep) => {
|
|
52
60
|
collectCss(dep, styleUrls, visitedModules, mod);
|
|
@@ -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.149-commit-
|
|
5
|
+
const PROJECT_VERSION = '0.4.149-commit-19b2220';
|
|
6
6
|
exports.PROJECT_VERSION = PROJECT_VERSION;
|
|
7
7
|
const projectInfo = {
|
|
8
8
|
projectName: 'Vike',
|
|
@@ -105,7 +105,9 @@ function handleHotUpdate(ctx, config, configVike) {
|
|
|
105
105
|
return;
|
|
106
106
|
}
|
|
107
107
|
if (isVikeConfig) {
|
|
108
|
-
|
|
108
|
+
/* Tailwind breaks this assertion, see https://github.com/vikejs/vike/discussions/1330#discussioncomment-7787238
|
|
109
|
+
assert(!isViteModule)
|
|
110
|
+
*/
|
|
109
111
|
reloadConfig(file, config, configVike, 'modified');
|
|
110
112
|
const virtualModules = getVirtualModules(server);
|
|
111
113
|
return virtualModules;
|
|
@@ -37,13 +37,21 @@ function collectCss(mod, styleUrls, visitedModules, importer) {
|
|
|
37
37
|
if (mod.url.startsWith('/')) {
|
|
38
38
|
styleUrls.add(mod.url);
|
|
39
39
|
}
|
|
40
|
+
else if (mod.url.startsWith('\0')) {
|
|
41
|
+
// Virtual modules
|
|
42
|
+
// - https://vitejs.dev/guide/api-plugin.html#virtual-modules-convention
|
|
43
|
+
// - I believe some Vite plugins don't respect the \0 virtual module convention. What should we do then?
|
|
44
|
+
// - https://github.com/vikejs/vike/issues/1327
|
|
45
|
+
// - https://github.com/vikejs/vike/commit/3f7b9916dddc84e29e2c20d2b0df7211b6f1acbd
|
|
46
|
+
styleUrls.add(`/@id/${mod.url.substring(1)}`);
|
|
47
|
+
}
|
|
40
48
|
else {
|
|
41
|
-
//
|
|
42
|
-
|
|
43
|
-
// - Reproduction: https://github.com/vikejs/vike/issues/479
|
|
44
|
-
// - Possible workaround: `<script>import 'virtual-module.css'</script>`
|
|
45
|
-
// logModule(mod)
|
|
49
|
+
// Is this useful? Maybe for virtual modules that don't respect the \0 virtual module convention?
|
|
50
|
+
styleUrls.add(`/@id/${mod.url}`);
|
|
46
51
|
}
|
|
52
|
+
/* Debug:
|
|
53
|
+
logModule(mod)
|
|
54
|
+
//*/
|
|
47
55
|
}
|
|
48
56
|
mod.importedModules.forEach((dep) => {
|
|
49
57
|
collectCss(dep, styleUrls, visitedModules, mod);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export { projectInfo };
|
|
2
2
|
export type { ProjectTag };
|
|
3
3
|
export { PROJECT_VERSION };
|
|
4
|
-
declare const PROJECT_VERSION: "0.4.149-commit-
|
|
4
|
+
declare const PROJECT_VERSION: "0.4.149-commit-19b2220";
|
|
5
5
|
type PackageName = typeof projectInfo.npmPackageName;
|
|
6
6
|
type ProjectVersion = typeof projectInfo.projectVersion;
|
|
7
7
|
type ProjectTag = `[${PackageName}]` | `[${PackageName}@${ProjectVersion}]`;
|
|
8
8
|
declare const projectInfo: {
|
|
9
9
|
projectName: "Vike";
|
|
10
|
-
projectVersion: "0.4.149-commit-
|
|
10
|
+
projectVersion: "0.4.149-commit-19b2220";
|
|
11
11
|
npmPackageName: "vike";
|
|
12
12
|
githubRepository: "https://github.com/vikejs/vike";
|
|
13
13
|
};
|
|
@@ -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.149-commit-
|
|
4
|
+
const PROJECT_VERSION = '0.4.149-commit-19b2220';
|
|
5
5
|
const projectInfo = {
|
|
6
6
|
projectName: 'Vike',
|
|
7
7
|
projectVersion: PROJECT_VERSION,
|