@ilha/astro 0.1.1 → 0.1.3
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 +15 -0
- package/dist/index.js +16 -2
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
1
|
import type { AstroIntegration, AstroRenderer } from "astro";
|
|
2
2
|
export declare function getRenderer(): AstroRenderer;
|
|
3
|
+
/**
|
|
4
|
+
* Vite's dependency optimizer otherwise inlines peer `ilha` into prebundled
|
|
5
|
+
* consumers (Areia, etc.) while the app loads workspace/linked `ilha` via
|
|
6
|
+
* `/@fs/...`. Nested island mount and `bind:*` then run on two runtimes.
|
|
7
|
+
*
|
|
8
|
+
* `resolve.dedupe` + `optimizeDeps.exclude` keep a single module instance.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getViteConfig(): {
|
|
11
|
+
resolve: {
|
|
12
|
+
dedupe: string[];
|
|
13
|
+
};
|
|
14
|
+
optimizeDeps: {
|
|
15
|
+
exclude: string[];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
3
18
|
export default function ilhaIntegration(): AstroIntegration;
|
package/dist/index.js
CHANGED
|
@@ -6,14 +6,28 @@ function getRenderer() {
|
|
|
6
6
|
serverEntrypoint: "@ilha/astro/server.js"
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Vite's dependency optimizer otherwise inlines peer `ilha` into prebundled
|
|
11
|
+
* consumers (Areia, etc.) while the app loads workspace/linked `ilha` via
|
|
12
|
+
* `/@fs/...`. Nested island mount and `bind:*` then run on two runtimes.
|
|
13
|
+
*
|
|
14
|
+
* `resolve.dedupe` + `optimizeDeps.exclude` keep a single module instance.
|
|
15
|
+
*/
|
|
16
|
+
function getViteConfig() {
|
|
17
|
+
return {
|
|
18
|
+
resolve: { dedupe: ["ilha"] },
|
|
19
|
+
optimizeDeps: { exclude: ["ilha"] }
|
|
20
|
+
};
|
|
21
|
+
}
|
|
9
22
|
function ilhaIntegration() {
|
|
10
23
|
return {
|
|
11
24
|
name: "@ilha/astro",
|
|
12
|
-
hooks: { "astro:config:setup": ({ addRenderer }) => {
|
|
25
|
+
hooks: { "astro:config:setup": ({ addRenderer, updateConfig }) => {
|
|
13
26
|
addRenderer(getRenderer());
|
|
27
|
+
updateConfig({ vite: getViteConfig() });
|
|
14
28
|
} }
|
|
15
29
|
};
|
|
16
30
|
}
|
|
17
31
|
|
|
18
32
|
//#endregion
|
|
19
|
-
export { ilhaIntegration as default, getRenderer };
|
|
33
|
+
export { ilhaIntegration as default, getRenderer, getViteConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ilha/astro",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Astro integration for Ilha islands",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"astro-component",
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"test": "bun test"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"astro": "^7.1.
|
|
55
|
-
"ilha": "^0.
|
|
54
|
+
"astro": "^7.1.6",
|
|
55
|
+
"ilha": "^0.10.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"astro": "^7.0.0",
|
|
59
|
-
"ilha": ">=0.
|
|
59
|
+
"ilha": ">=0.10.0"
|
|
60
60
|
}
|
|
61
61
|
}
|