@tsrx/vite-plugin-solid 0.0.39 → 0.0.41
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 +3 -3
- package/src/index.js +5 -7
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Vite plugin for @tsrx/solid (.tsrx modules) targeting Solid 2.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Dominic Gannaway",
|
|
6
|
-
"version": "0.0.
|
|
6
|
+
"version": "0.0.41",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"publishConfig": {
|
|
9
9
|
"access": "public"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@tsrx/solid": "0.1.
|
|
23
|
+
"@tsrx/solid": "0.1.11"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"vite": "*"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"typescript": "^5.9.3",
|
|
31
31
|
"vite": "^8.0.12",
|
|
32
32
|
"vite-plugin-solid": "3.0.0-next.5",
|
|
33
|
-
"@tsrx/core": "0.1.
|
|
33
|
+
"@tsrx/core": "0.1.11"
|
|
34
34
|
},
|
|
35
35
|
"files": [
|
|
36
36
|
"src",
|
package/src/index.js
CHANGED
|
@@ -119,25 +119,23 @@ export function tsrxSolid(options = {}) {
|
|
|
119
119
|
|
|
120
120
|
const real_path = to_real_path(id.split('?')[0]);
|
|
121
121
|
const source = await readFile(real_path, 'utf-8');
|
|
122
|
-
|
|
122
|
+
let { code, css, map } = compile(source, real_path);
|
|
123
123
|
|
|
124
|
-
let final_code = code;
|
|
125
|
-
let final_map = /** @type {any} */ (map);
|
|
126
124
|
if (css) {
|
|
127
125
|
css_cache.set(real_path, css);
|
|
128
|
-
|
|
126
|
+
code = `import ${JSON.stringify(real_path + CSS_QUERY)};\n${code}`;
|
|
129
127
|
// The prepended import adds one line to the generated output;
|
|
130
128
|
// shift every mapping down by one line so source positions stay
|
|
131
129
|
// aligned. In VLQ source maps, each `;` separates generated
|
|
132
130
|
// lines, so prefixing one `;` offsets all mappings by one line.
|
|
133
|
-
if (
|
|
134
|
-
|
|
131
|
+
if (map && typeof map.mappings === 'string') {
|
|
132
|
+
map = { ...map, mappings: ';' + map.mappings };
|
|
135
133
|
}
|
|
136
134
|
} else {
|
|
137
135
|
css_cache.delete(real_path);
|
|
138
136
|
}
|
|
139
137
|
|
|
140
|
-
return { code
|
|
138
|
+
return { code, map };
|
|
141
139
|
},
|
|
142
140
|
|
|
143
141
|
handleHotUpdate(ctx) {
|