@ilha/void 0.1.0 → 0.1.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/index.js +1 -0
- package/dist/plugin.js +37 -23
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19,6 +19,7 @@ const Form = ({ children, form, method = "post", renderError, ...attributes }) =
|
|
|
19
19
|
"aria-busy": String(form.pending),
|
|
20
20
|
onsubmit: async (event) => {
|
|
21
21
|
event.preventDefault();
|
|
22
|
+
now.set(Date.now());
|
|
22
23
|
if (!formSubmissionBlocked(form, now())) await form[method]();
|
|
23
24
|
}
|
|
24
25
|
}, message ? h("div", {
|
package/dist/plugin.js
CHANGED
|
@@ -347,30 +347,44 @@ const withNoExternal = (existing, names) => {
|
|
|
347
347
|
else if (existing !== void 0) list = [existing];
|
|
348
348
|
return [.../* @__PURE__ */ new Set([...list, ...names])];
|
|
349
349
|
};
|
|
350
|
-
const configPlugin = () =>
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
optimizeDeps: { include: [
|
|
350
|
+
const configPlugin = () => {
|
|
351
|
+
let root = process.cwd();
|
|
352
|
+
const singletonExcludes = () => [
|
|
353
|
+
"ilha",
|
|
354
|
+
"ilha/jsx-runtime",
|
|
355
|
+
"ilha/jsx-dev-runtime",
|
|
356
|
+
"@ilha/void",
|
|
357
|
+
...detectIlhaConsumers(root)
|
|
358
|
+
];
|
|
359
|
+
return {
|
|
360
|
+
config(userConfig) {
|
|
361
|
+
root = userConfig.root ? path.resolve(userConfig.root) : process.cwd();
|
|
362
|
+
const singletons = [
|
|
364
363
|
"ilha",
|
|
365
|
-
"ilha/
|
|
366
|
-
|
|
367
|
-
]
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
364
|
+
"@ilha/void",
|
|
365
|
+
...detectIlhaConsumers(root)
|
|
366
|
+
];
|
|
367
|
+
return {
|
|
368
|
+
...userConfig.oxc === false || userConfig.oxc?.jsx !== void 0 ? {} : { oxc: { jsx: {
|
|
369
|
+
importSource: "ilha",
|
|
370
|
+
runtime: "automatic"
|
|
371
|
+
} } },
|
|
372
|
+
optimizeDeps: { include: [
|
|
373
|
+
"ilha",
|
|
374
|
+
"ilha/jsx-runtime",
|
|
375
|
+
"ilha/jsx-dev-runtime"
|
|
376
|
+
] },
|
|
377
|
+
resolve: { dedupe: singletons },
|
|
378
|
+
ssr: { noExternal: withNoExternal(userConfig.ssr?.noExternal, singletons) }
|
|
379
|
+
};
|
|
380
|
+
},
|
|
381
|
+
configEnvironment(name) {
|
|
382
|
+
if (name === "client") return;
|
|
383
|
+
return { optimizeDeps: { exclude: singletonExcludes() } };
|
|
384
|
+
},
|
|
385
|
+
name: "@ilha/void:config"
|
|
386
|
+
};
|
|
387
|
+
};
|
|
374
388
|
/**
|
|
375
389
|
* Render Void pages, layouts, and islands with ilha. Add it after
|
|
376
390
|
* `voidPlugin()` in your Vite config.
|