@ultimat3/render 22.2.1 → 22.2.2
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/package.json +6 -6
- package/src/module-loader.ts +7 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultimat3/render",
|
|
3
|
-
"version": "22.2.
|
|
3
|
+
"version": "22.2.2",
|
|
4
4
|
"description": "The route primitive and the five render modes: static, isr, ssr, stream, spa.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"test": "bun test"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@ultimat3/cache": "22.2.
|
|
40
|
-
"@ultimat3/core": "22.2.
|
|
41
|
-
"@ultimat3/http": "22.2.
|
|
42
|
-
"@ultimat3/i18n": "22.2.
|
|
43
|
-
"@ultimat3/seo": "22.2.
|
|
39
|
+
"@ultimat3/cache": "22.2.2",
|
|
40
|
+
"@ultimat3/core": "22.2.2",
|
|
41
|
+
"@ultimat3/http": "22.2.2",
|
|
42
|
+
"@ultimat3/i18n": "22.2.2",
|
|
43
|
+
"@ultimat3/seo": "22.2.2",
|
|
44
44
|
"sass": "1.104.0"
|
|
45
45
|
}
|
|
46
46
|
}
|
package/src/module-loader.ts
CHANGED
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
* `bun test` all load a component the same way and there is no separate "bundled" behaviour.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
// why: Bun ships no path API, and a relative app root has to be resolved against the working
|
|
8
|
+
// directory before it can be compared with the absolute paths the Bun plugin hands this loader.
|
|
9
|
+
import { resolve } from 'node:path';
|
|
7
10
|
import { renderThrowable } from '@ultimat3/core';
|
|
8
11
|
import { compileStylesheet, isGlobalStylesheet, stripCharset } from './css-modules';
|
|
9
12
|
import { PrerenderFailedError } from './errors';
|
|
@@ -115,10 +118,12 @@ const surfaceOfSheet = (path: string): Surface | null =>
|
|
|
115
118
|
* Every sheet already registered is classified again, because a sheet can load before the root is
|
|
116
119
|
* named — and a classification frozen then would keep the answer the wrong root gave. The revision
|
|
117
120
|
* moves only when an answer does, so naming the same root twice mints no new stylesheet URL.
|
|
118
|
-
* `undefined` returns to the working
|
|
121
|
+
* A relative root is resolved against the working directory. `undefined` returns to the working
|
|
122
|
+
* directory.
|
|
119
123
|
*/
|
|
120
124
|
export function setStylesheetRoot(root: string | undefined): void {
|
|
121
|
-
|
|
125
|
+
// Resolved: `loadApp('.')` is a legal call, and `.` is a prefix of no absolute path.
|
|
126
|
+
stylesheetRoot = root === undefined ? undefined : resolve(root);
|
|
122
127
|
for (const [path, sheet] of stylesheets) {
|
|
123
128
|
const surface = surfaceOfSheet(path);
|
|
124
129
|
if (surface === sheet.surface) continue;
|