@ilha/void 0.1.1 → 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.
Files changed (2) hide show
  1. package/dist/plugin.js +37 -23
  2. package/package.json +1 -1
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
- config(userConfig) {
352
- const root = userConfig.root ? path.resolve(userConfig.root) : process.cwd();
353
- const singletons = [
354
- "ilha",
355
- "@ilha/void",
356
- ...detectIlhaConsumers(root)
357
- ];
358
- return {
359
- ...userConfig.oxc === false || userConfig.oxc?.jsx !== void 0 ? {} : { oxc: { jsx: {
360
- importSource: "ilha",
361
- runtime: "automatic"
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/jsx-runtime",
366
- "ilha/jsx-dev-runtime"
367
- ] },
368
- resolve: { dedupe: singletons },
369
- ssr: { noExternal: withNoExternal(userConfig.ssr?.noExternal, singletons) }
370
- };
371
- },
372
- name: "@ilha/void:config"
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ilha/void",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Ilha pages, server rendering, islands, forms, and navigation for Void",
5
5
  "keywords": [
6
6
  "frontend",