olovaplugin 1.0.0 → 1.0.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/dist/olovaplugin.js +3 -17
- package/package.json +1 -1
package/dist/olovaplugin.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// Vite plugin for Olova JSX transformation
|
|
2
1
|
export default function olovaPlugin(options = {}) {
|
|
3
2
|
return {
|
|
4
3
|
name: "vite-plugin-olova",
|
|
@@ -8,31 +7,18 @@ export default function olovaPlugin(options = {}) {
|
|
|
8
7
|
esbuild: {
|
|
9
8
|
jsxFactory: "h",
|
|
10
9
|
jsxFragment: "Fragment",
|
|
11
|
-
jsxInject: `import { h } from '
|
|
10
|
+
jsxInject: `import { h, Fragment } from 'olova'`,
|
|
12
11
|
},
|
|
13
12
|
resolve: {
|
|
14
13
|
alias: {
|
|
15
14
|
// Add any aliases you need
|
|
16
|
-
"@olova": "
|
|
15
|
+
"@olova": "olova",
|
|
17
16
|
},
|
|
18
17
|
},
|
|
19
18
|
optimizeDeps: {
|
|
20
|
-
include: ["
|
|
19
|
+
include: ["olova"],
|
|
21
20
|
},
|
|
22
21
|
};
|
|
23
22
|
},
|
|
24
|
-
|
|
25
|
-
// Optional: Transform hook if you need custom transformations beyond esbuild
|
|
26
|
-
async transform(code, id) {
|
|
27
|
-
if (!id.endsWith(".jsx") && !id.endsWith(".tsx")) {
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// Add any custom transformations here if needed
|
|
32
|
-
return {
|
|
33
|
-
code,
|
|
34
|
-
map: null,
|
|
35
|
-
};
|
|
36
|
-
},
|
|
37
23
|
};
|
|
38
24
|
}
|