@tsrx/bun-plugin-preact 0.0.88 → 0.0.89
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 +2 -2
- package/package.json +2 -2
- package/src/index.js +3 -1
package/README.md
CHANGED
|
@@ -22,8 +22,8 @@ await Bun.build({
|
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
The plugin compiles `.tsrx` modules with `@tsrx/preact`, runs Bun's TSX transform
|
|
25
|
-
for Preact's automatic JSX runtime, and emits
|
|
26
|
-
virtual CSS modules.
|
|
25
|
+
for Preact's automatic JSX runtime, and emits sibling-scoped `<style>` blocks
|
|
26
|
+
(each styles its siblings and everything below them) as virtual CSS modules.
|
|
27
27
|
|
|
28
28
|
For `bun:test`, register it from a preload:
|
|
29
29
|
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Bun plugin for @tsrx/preact (.tsrx modules)",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Dominic Gannaway",
|
|
6
|
-
"version": "0.0.
|
|
6
|
+
"version": "0.0.89",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"publishConfig": {
|
|
9
9
|
"access": "public"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@tsrx/preact": "0.1.
|
|
23
|
+
"@tsrx/preact": "0.1.66"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"bun": "^1.0.0",
|
package/src/index.js
CHANGED
|
@@ -131,7 +131,9 @@ export function tsrxPreact(options = {}) {
|
|
|
131
131
|
let output = code;
|
|
132
132
|
if (emit_css && css) {
|
|
133
133
|
css_cache.set(css_id, css);
|
|
134
|
-
|
|
134
|
+
// After the module's own imports so imported themes' sheets load first
|
|
135
|
+
// and a rule in the applying module wins at equal specificity.
|
|
136
|
+
output = `${code}\nimport ${JSON.stringify(css_id)};\n`;
|
|
135
137
|
} else {
|
|
136
138
|
css_cache.delete(css_id);
|
|
137
139
|
}
|