@tsrx/bun-plugin-react 0.1.87 → 0.1.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/react`, runs Bun's TSX transform
|
|
25
|
-
for React's automatic JSX runtime, and emits
|
|
26
|
-
virtual CSS modules.
|
|
25
|
+
for React's automatic JSX runtime, and emits sibling-scoped `<style>` blocks (each
|
|
26
|
+
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/react (.tsrx modules)",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Dominic Gannaway",
|
|
6
|
-
"version": "0.1.
|
|
6
|
+
"version": "0.1.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/react": "0.2.
|
|
23
|
+
"@tsrx/react": "0.2.66"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"bun": "^1.0.0",
|
package/src/index.js
CHANGED
|
@@ -127,7 +127,9 @@ export function tsrxReact(options = {}) {
|
|
|
127
127
|
let output = code;
|
|
128
128
|
if (emit_css && css) {
|
|
129
129
|
css_cache.set(css_id, css);
|
|
130
|
-
|
|
130
|
+
// After the module's own imports so imported themes' sheets load first
|
|
131
|
+
// and a rule in the applying module wins at equal specificity.
|
|
132
|
+
output = `${code}\nimport ${JSON.stringify(css_id)};\n`;
|
|
131
133
|
} else {
|
|
132
134
|
css_cache.delete(css_id);
|
|
133
135
|
}
|