@ttsc/unplugin 0.27.0 → 0.28.1
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/README.md +1 -1
- package/lib/core/index.d.ts +1 -1
- package/lib/core/index.js +49 -8
- package/lib/core/index.js.map +1 -1
- package/lib/core/index.mjs +49 -8
- package/lib/core/index.mjs.map +1 -1
- package/lib/core/transform.d.ts +144 -1
- package/lib/core/transform.js +1188 -159
- package/lib/core/transform.js.map +1 -1
- package/lib/core/transform.mjs +1188 -159
- package/lib/core/transform.mjs.map +1 -1
- package/lib/core/viteServe.d.ts +9 -2
- package/lib/core/viteServe.js +2 -2
- package/lib/core/viteServe.js.map +1 -1
- package/lib/core/viteServe.mjs +2 -2
- package/lib/core/viteServe.mjs.map +1 -1
- package/package.json +3 -3
- package/src/core/index.ts +54 -10
- package/src/core/transform.ts +1579 -198
- package/src/core/viteServe.ts +11 -4
package/src/core/viteServe.ts
CHANGED
|
@@ -86,8 +86,15 @@ export interface ViteServeMissingInputWatch {
|
|
|
86
86
|
* config's `command`, as the adapter does.
|
|
87
87
|
*/
|
|
88
88
|
serving(): boolean;
|
|
89
|
-
/**
|
|
90
|
-
|
|
89
|
+
/**
|
|
90
|
+
* Register one missing watch input derived for `importer`.
|
|
91
|
+
*
|
|
92
|
+
* `identity` is the filesystem identity the transform generation already
|
|
93
|
+
* resolved for `input`. Resolving it here instead costs a `realpath` and a
|
|
94
|
+
* case-sensitivity directory listing per input per delivery, because a
|
|
95
|
+
* per-call identity context memoizes nothing (samchon/ttsc#1246).
|
|
96
|
+
*/
|
|
97
|
+
watch(input: string, importer: string, identity?: string): void;
|
|
91
98
|
}
|
|
92
99
|
|
|
93
100
|
/** Poll bookkeeping for one registered missing path. */
|
|
@@ -125,9 +132,9 @@ export function createViteServeMissingInputWatch(): ViteServeMissingInputWatch {
|
|
|
125
132
|
serving() {
|
|
126
133
|
return server !== undefined;
|
|
127
134
|
},
|
|
128
|
-
watch(input, importer) {
|
|
135
|
+
watch(input, importer, resolved) {
|
|
129
136
|
const spelling = path.resolve(input);
|
|
130
|
-
const identity = pathIdentityKey(spelling);
|
|
137
|
+
const identity = resolved ?? pathIdentityKey(spelling);
|
|
131
138
|
const existing = entries.get(identity);
|
|
132
139
|
if (existing !== undefined) {
|
|
133
140
|
existing.importers.add(path.resolve(importer));
|