twynejs 1.0.0 → 1.0.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/dist/index.d.ts +0 -1
- package/dist/index.js +4 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -842,12 +842,14 @@ ${ctx.content}
|
|
|
842
842
|
};
|
|
843
843
|
},
|
|
844
844
|
async transform(code, id) {
|
|
845
|
-
if (!id.endsWith(".tsx")) {
|
|
845
|
+
if (!id.endsWith(".tsx") && !id.endsWith(".jsx")) {
|
|
846
846
|
return null;
|
|
847
847
|
}
|
|
848
|
+
const loader = id.endsWith(".tsx") ? "tsx" : "jsx";
|
|
848
849
|
const result = await transformWithEsbuild(code, id, {
|
|
849
|
-
loader
|
|
850
|
+
loader,
|
|
850
851
|
target: "esnext",
|
|
852
|
+
jsx: "transform",
|
|
851
853
|
jsxFactory: "jsx",
|
|
852
854
|
jsxFragment: "Fragment",
|
|
853
855
|
sourcemap: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "twynejs",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "twine A Vite SSG plugin that turns .ts/.tsx pages, Markdown docs and Liquid/EJS templates into a multi-page static build with a virtual:pages module.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|