create-outsystems-astro 0.6.0 → 0.7.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/README.md +50 -11
- package/bin/cli.js +66 -5
- package/package.json +1 -1
- package/template/AGENTS.md +91 -4
- package/template/astro.config.mjs +14 -3
- package/template/bun.lock +297 -268
- package/template/deno.json +21 -1
- package/template/deno.lock +595 -316
- package/template/eslint.config.mjs +27 -2
- package/template/package-lock.json +777 -276
- package/template/package.json +62 -30
- package/template/patches/{@angular+build+21.2.0.patch → @angular+build+21.2.2.patch} +1 -10
- package/template/patches-deno/playwright+1.58.2.patch +26 -0
- package/template/playwright.config.ts +1 -1
- package/template/pnpm-lock.yaml +1033 -621
- package/template/src/framework/angular/{Counter.component.ts → Demo.component.ts} +12 -5
- package/template/src/framework/angular/Store.component.ts +24 -0
- package/template/src/framework/preact/Demo.tsx +86 -0
- package/template/src/framework/preact/Store.tsx +31 -0
- package/template/src/framework/react/{Counter.tsx → Demo.tsx} +23 -17
- package/template/src/framework/react/Store.tsx +31 -0
- package/template/src/framework/svelte/{Counter.svelte → Demo.svelte} +8 -11
- package/template/src/framework/svelte/Store.svelte +22 -0
- package/template/src/framework/vue/{Counter.vue → Demo.vue} +7 -9
- package/template/src/framework/vue/Store.vue +28 -0
- package/template/src/images/angular.png +0 -0
- package/template/src/images/preact.png +0 -0
- package/template/src/images/react.png +0 -0
- package/template/src/images/svelte.png +0 -0
- package/template/src/images/vue.png +0 -0
- package/template/src/pages/angular/{angular-counter.astro → angular-demo.astro} +12 -5
- package/template/src/pages/multi/store.astro +22 -0
- package/template/src/pages/preact/preact-demo.astro +66 -0
- package/template/src/pages/react/{react-counter.astro → react-demo.astro} +12 -9
- package/template/src/pages/svelte/{svelte-counter.astro → svelte-demo.astro} +9 -9
- package/template/src/pages/vue/{vue-counter.astro → vue-demo.astro} +9 -15
- package/template/src/stores/framework.ts +10 -0
- package/template/src/styles/index.css +4 -0
- package/template/test/e2e/angular/angular-counter.spec.ts +7 -1
- package/template/test/e2e/preact/preact-counter.spec.ts +42 -0
- package/template/test/e2e/react/react-counter.spec.ts +2 -2
- package/template/test/e2e/svelte/svelte-counter.spec.ts +2 -2
- package/template/test/e2e/vue/vue-counter.spec.ts +2 -2
- package/template/test/integration/angular/{Counter.component.spec.ts → Demo.component.spec.ts} +6 -6
- package/template/test/integration/preact/Demo.test.tsx +84 -0
- package/template/test/integration/react/{Counter.test.tsx → Demo.test.tsx} +10 -9
- package/template/test/integration/svelte/{Counter.test.ts → Demo.test.ts} +9 -9
- package/template/test/integration/svelte/{SlotCounter.wrapper.svelte → Demo.wrapper.svelte} +3 -3
- package/template/test/integration/vue/{Counter.test.ts → Demo.test.ts} +9 -9
- package/template/tsconfig.json +0 -1
- package/template/vitest.config.ts +12 -0
- package/template/yarn.lock +580 -242
- /package/template/patches/{@analogjs+astro-angular+2.3.0.patch → @analogjs+astro-angular+2.3.1.patch} +0 -0
package/README.md
CHANGED
|
@@ -13,7 +13,9 @@ Generates [Astro Islands](https://docs.astro.build/en/concepts/islands/) for use
|
|
|
13
13
|
|
|
14
14
|
## Current supported frameworks
|
|
15
15
|
- [Angular](https://analogjs.org/docs/packages/astro-angular/overview)
|
|
16
|
+
- [Preact](https://docs.astro.build/en/guides/integrations-guide/preact/)
|
|
16
17
|
- [React](https://docs.astro.build/en/guides/integrations-guide/react/)
|
|
18
|
+
- [Svelte](https://docs.astro.build/en/guides/integrations-guide/svelte/)
|
|
17
19
|
- [Vue](https://docs.astro.build/en/guides/integrations-guide/vue/)
|
|
18
20
|
|
|
19
21
|
## Getting started
|
|
@@ -55,29 +57,66 @@ This will create the generated files as well as an example component.
|
|
|
55
57
|
/
|
|
56
58
|
├── public/
|
|
57
59
|
├── src/
|
|
58
|
-
│ └──
|
|
59
|
-
│ └──
|
|
60
|
+
│ └── framework/
|
|
61
|
+
│ └── [NAME]/
|
|
62
|
+
│ └── components/
|
|
63
|
+
│ └── Counter.tsx
|
|
64
|
+
│ └── lib/
|
|
65
|
+
│ └── library.ts
|
|
60
66
|
│ └── images/
|
|
61
67
|
│ └── image.png
|
|
62
68
|
│ └── pages/
|
|
63
|
-
│ └──
|
|
69
|
+
│ └── [NAME]/
|
|
70
|
+
│ └── page.astro
|
|
64
71
|
│ └── styles/
|
|
65
72
|
│ └── index.css
|
|
73
|
+
│ └── stores/
|
|
74
|
+
│ └── store.ts
|
|
75
|
+
├── test/
|
|
76
|
+
│ └── e2e
|
|
77
|
+
│ └── [NAME]/
|
|
78
|
+
│ └── counter.spec.ts
|
|
79
|
+
│ └── integration
|
|
80
|
+
│ └── [NAME]/
|
|
81
|
+
│ └── counter.test.tsx
|
|
82
|
+
│ └── conter.test.ts
|
|
83
|
+
│ └── unit
|
|
84
|
+
└── counter.test.ts
|
|
66
85
|
└── package.json
|
|
67
86
|
```
|
|
68
87
|
|
|
69
|
-
###
|
|
70
|
-
Each page inside of the pages file should represent an Island that will be imported into OutSystems.
|
|
88
|
+
### Src
|
|
71
89
|
|
|
72
|
-
|
|
73
|
-
The location of the component code.
|
|
90
|
+
#### Framework Components
|
|
91
|
+
The location of the component code. Each framework has its own separate folder.
|
|
74
92
|
|
|
75
|
-
|
|
93
|
+
#### Lib
|
|
94
|
+
Cane be use for shared/library logic that is not part of the visual presentation of the component.
|
|
95
|
+
|
|
96
|
+
#### Images
|
|
76
97
|
Any image assets.
|
|
77
98
|
|
|
78
|
-
|
|
99
|
+
#### Pages
|
|
100
|
+
Each page inside of the pages file should represent an Island that will be imported into OutSystems. This is for setup/development and the actual page will not be used for the final output. Pages may be split by framework if using multiple frameworks.
|
|
101
|
+
|
|
102
|
+
#### Styles
|
|
79
103
|
Stylesheets that may apply to the component.
|
|
80
104
|
|
|
105
|
+
#### Stores
|
|
106
|
+
Nano Stores for use in components.
|
|
107
|
+
|
|
108
|
+
### Test
|
|
109
|
+
|
|
110
|
+
#### E2E
|
|
111
|
+
End-to-end tests using Playwright.
|
|
112
|
+
|
|
113
|
+
#### Integration
|
|
114
|
+
Integration tests that test the whole component structure. Written using Testing Library specific providers.
|
|
115
|
+
|
|
116
|
+
#### Unit
|
|
117
|
+
Unit tests for functions or shared code/libraries.
|
|
118
|
+
|
|
119
|
+
|
|
81
120
|
## 🧞 Commands
|
|
82
121
|
|
|
83
122
|
All commands are run from the root of the project, from a terminal:
|
|
@@ -138,7 +177,7 @@ All commands are run from the root of the project, from a terminal:
|
|
|
138
177
|
|
|
139
178
|
| Command | Action |
|
|
140
179
|
| :------------------------ | :----------------------------------------------- |
|
|
141
|
-
| `deno install && deno run postinstall` | Installs dependencies |
|
|
180
|
+
| `deno install && deno run postinstall:deno` | Installs dependencies |
|
|
142
181
|
| `deno run dev` | Starts local dev server at `localhost:4321` |
|
|
143
182
|
| `deno run build` | Build distribution to `./dist/` |
|
|
144
183
|
| `deno run output:deno` | Build OutSystems production site to `./output/` |
|
|
@@ -148,7 +187,7 @@ All commands are run from the root of the project, from a terminal:
|
|
|
148
187
|
| `deno run audit:deno` | Run audit of modules |
|
|
149
188
|
|
|
150
189
|
## Getting Started
|
|
151
|
-
Delete the demo application under the ```src``` folder and being to build your own application.
|
|
190
|
+
Delete the demo application under the ```src``` folder and being to build your own application. It is recommended to keep the folder structure. The frameworks/[NAME]/components should be kept for asset building.
|
|
152
191
|
|
|
153
192
|
## Converting to OutSystems
|
|
154
193
|
|
package/bin/cli.js
CHANGED
|
@@ -16,6 +16,7 @@ const __dirname = path.dirname(__filename);
|
|
|
16
16
|
|
|
17
17
|
const FRAMEWORKS = [
|
|
18
18
|
{ title: "Angular", value: "angular" },
|
|
19
|
+
{ title: "Preact", value: "preact" },
|
|
19
20
|
{ title: "React", value: "react" },
|
|
20
21
|
{ title: "Svelte", value: "svelte" },
|
|
21
22
|
{ title: "Vue", value: "vue" }
|
|
@@ -69,6 +70,8 @@ async function main() {
|
|
|
69
70
|
|
|
70
71
|
updateAstroConfig(targetDir, selectedFrameworks);
|
|
71
72
|
|
|
73
|
+
updateMultiAstroPage(targetDir, selectedFrameworks)
|
|
74
|
+
|
|
72
75
|
const readmeSrc = path.resolve(__dirname, "../README.md");
|
|
73
76
|
const readmeDest = path.join(targetDir, "README.md");
|
|
74
77
|
|
|
@@ -92,7 +95,10 @@ function copyDir(src, dest) {
|
|
|
92
95
|
fs.mkdirSync(dest, { recursive: true });
|
|
93
96
|
for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
|
|
94
97
|
const srcPath = path.join(src, entry.name);
|
|
95
|
-
|
|
98
|
+
|
|
99
|
+
// Check if the file is our renamed gitignore
|
|
100
|
+
const destName = entry.name === ".npmignore" ? ".gitignore" : entry.name;
|
|
101
|
+
const destPath = path.join(dest, destName);
|
|
96
102
|
|
|
97
103
|
if (entry.isDirectory()) {
|
|
98
104
|
copyDir(srcPath, destPath);
|
|
@@ -153,17 +159,21 @@ function updateAstroConfig(projectDir, selectedFrameworks) {
|
|
|
153
159
|
import: /import\s+angular\s+from\s+['"]@analogjs\/astro-angular['"];\s*\n?/,
|
|
154
160
|
integration: /angular\s*\(\s*\{[\s\S]*?\}\s*\)\s*,?\s*/
|
|
155
161
|
},
|
|
162
|
+
preact: {
|
|
163
|
+
import: /import\s+preact\s+from\s+['"]@astrojs\/preact['"];\s*\n?/,
|
|
164
|
+
integration: /preact\s*\(\s*\{[\s\S]*?\}\s*\)\s*,?\s*/
|
|
165
|
+
},
|
|
156
166
|
react: {
|
|
157
167
|
import: /import\s+react\s+from\s+['"]@astrojs\/react['"];\s*\n?/,
|
|
158
|
-
integration: /react\(\)\s*,?\s*/
|
|
168
|
+
integration: /react\s*\(\s*\{[\s\S]*?\}\s*\)\s*,?\s*/
|
|
159
169
|
},
|
|
160
170
|
svelte: {
|
|
161
171
|
import: /import\s+svelte\s+from\s+['"]@astrojs\/svelte['"];\s*\n?/,
|
|
162
|
-
integration: /svelte\(\)\s*,?\s*/
|
|
172
|
+
integration: /svelte\s*\(\s*\{[\s\S]*?\}\s*\)\s*,?\s*/
|
|
163
173
|
},
|
|
164
174
|
vue: {
|
|
165
175
|
import: /import\s+vue\s+from\s+['"]@astrojs\/vue['"];\s*\n?/,
|
|
166
|
-
integration: /vue\(\)\s*,?\s*/
|
|
176
|
+
integration: /vue\s*\(\s*\{[\s\S]*?\}\s*\)\s*,?\s*/
|
|
167
177
|
}
|
|
168
178
|
};
|
|
169
179
|
|
|
@@ -188,6 +198,57 @@ function updateAstroConfig(projectDir, selectedFrameworks) {
|
|
|
188
198
|
console.log("🛠️ Updated astro.config.mjs integrations");
|
|
189
199
|
}
|
|
190
200
|
|
|
201
|
+
function updateMultiAstroPage(projectDir, selectedFrameworks) {
|
|
202
|
+
const pagePath = path.join(projectDir, "src", "pages", "multi", "store.astro");
|
|
203
|
+
|
|
204
|
+
if (!fs.existsSync(pagePath)) {
|
|
205
|
+
console.warn(`⚠️ ${path.relative(projectDir, pagePath)} not found, skipping page cleanup.`);
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
let content = fs.readFileSync(pagePath, "utf-8");
|
|
210
|
+
|
|
211
|
+
// Map each framework to its specific Import and Component tag patterns
|
|
212
|
+
const frameworkMap = {
|
|
213
|
+
angular: {
|
|
214
|
+
import: /import\s+AngularStore\s+from\s+['"].*?angular\/Store\.component['"];?\s*\n?/g,
|
|
215
|
+
component: /<AngularStore\s+client:visible\s*\/>\s*\n?/g
|
|
216
|
+
},
|
|
217
|
+
preact: {
|
|
218
|
+
import: /import\s+PreactStore\s+from\s+['"].*?preact\/Store['"];?\s*\n?/g,
|
|
219
|
+
component: /<PreactStore\s+client:only="preact"\s*\/>\s*\n?/g
|
|
220
|
+
},
|
|
221
|
+
react: {
|
|
222
|
+
import: /import\s+ReactStore\s+from\s+['"].*?react\/Store['"];?\s*\n?/g,
|
|
223
|
+
component: /<ReactStore\s+client:only="react"\s*\/>\s*\n?/g
|
|
224
|
+
},
|
|
225
|
+
svelte: {
|
|
226
|
+
import: /import\s+SvelteStore\s+from\s+['"].*?svelte\/Store\.svelte['"];?\s*\n?/g,
|
|
227
|
+
component: /<SvelteStore\s+client:only="svelte"\s*\/>\s*\n?/g
|
|
228
|
+
},
|
|
229
|
+
vue: {
|
|
230
|
+
import: /import\s+VueStore\s+from\s+['"].*?vue\/Store\.vue['"];?\s*\n?/g,
|
|
231
|
+
component: /<VueStore\s+client:only="vue"\s*\/>\s*\n?/g
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
FRAMEWORKS.forEach(({ value: framework }) => {
|
|
236
|
+
if (!selectedFrameworks.includes(framework)) {
|
|
237
|
+
const patterns = frameworkMap[framework];
|
|
238
|
+
if (patterns) {
|
|
239
|
+
content = content.replace(patterns.import, "");
|
|
240
|
+
content = content.replace(patterns.component, "");
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
// Clean up any double-newlines left behind in the template body
|
|
246
|
+
content = content.replace(/\n\s*\n\s*\n/g, "\n\n");
|
|
247
|
+
|
|
248
|
+
fs.writeFileSync(pagePath, content, "utf-8");
|
|
249
|
+
console.log(`✨ Cleaned up components in ${path.relative(projectDir, pagePath)}`);
|
|
250
|
+
}
|
|
251
|
+
|
|
191
252
|
function detectPackageManager() {
|
|
192
253
|
if (typeof Deno !== "undefined") return "deno";
|
|
193
254
|
|
|
@@ -231,7 +292,7 @@ function packageInstall(targetDir) {
|
|
|
231
292
|
yarn: "yarn",
|
|
232
293
|
pnpm: "pnpm install",
|
|
233
294
|
bun: "bun install",
|
|
234
|
-
deno: "deno install && deno run postinsall",
|
|
295
|
+
deno: "deno install && deno run postinsall:deno",
|
|
235
296
|
unknown: "npm install"
|
|
236
297
|
}[packageManager];
|
|
237
298
|
|
package/package.json
CHANGED
package/template/AGENTS.md
CHANGED
|
@@ -6,8 +6,10 @@
|
|
|
6
6
|
- The output generation will be only client side. No server side rendering or server side components will be used.
|
|
7
7
|
- The Astro Islands can be used generated with the following frameworks:
|
|
8
8
|
- Angular - Documentation available at https://analogjs.org/docs/packages/astro-angular/overview
|
|
9
|
+
- Preact - Documentation available at https://docs.astro.build/en/guides/integrations-guide/preact/
|
|
9
10
|
- React - Documentation available at https://docs.astro.build/en/guides/integrations-guide/react/
|
|
10
|
-
-
|
|
11
|
+
- Svelte - Documentation availabe at https://docs.astro.build/en/guides/integrations-guide/svelte/
|
|
12
|
+
- Vue - Documentation available at https://docs.astro.build/en/guides/integrations-guide/vue/
|
|
11
13
|
- Prefer to use TypeScript when possible.
|
|
12
14
|
|
|
13
15
|
## OutSystems
|
|
@@ -28,11 +30,14 @@ In OutSystems 11, the Islands library is available at https://www.outsystems.com
|
|
|
28
30
|
|
|
29
31
|
In OutSystems Developer Cloud, the Islands library is available at https://www.outsystems.com/forge/component-overview/22960/islands-odc.
|
|
30
32
|
|
|
33
|
+
- When starting a project, the demo files should be deleted. The demo files under src/ and test/.
|
|
34
|
+
|
|
31
35
|
### Pages
|
|
32
36
|
|
|
33
37
|
- The files in src/pages/\*.astro are used as a starting point and holds the components for generation. They can be tested by running `npm run dev`. That will show what the component looks like as rendered. The sample example pages are broken out by framework name (src/pages/react, src/pages/vue, etc). This page will house the component(s) entry points.
|
|
34
38
|
- When importing a component, the component must have the attribute of the client:only= + the framework name.\
|
|
35
39
|
- Angular: `client:visible`
|
|
40
|
+
- Preact: `client:only="preact"`
|
|
36
41
|
- React: `client:only="react"`
|
|
37
42
|
- Svelte: `client:only="svelte"`
|
|
38
43
|
- Vue: `client:only="vue"`
|
|
@@ -41,10 +46,25 @@ In OutSystems Developer Cloud, the Islands library is available at https://www.o
|
|
|
41
46
|
|
|
42
47
|
- The components live in the folder framework/{NAME}/:
|
|
43
48
|
- Angular: src/framework/angular
|
|
49
|
+
- Preact: src/framework/react
|
|
44
50
|
- React: src/framework/react
|
|
45
51
|
- Svelte: src/framework/svelte
|
|
46
52
|
- Vue: src/framework/vue
|
|
47
|
-
|
|
53
|
+
|
|
54
|
+
The framework folder should stay in place as the components will be rendered from there. The Angular components will only be transformed by Astro if they are in the framework/angular folder.
|
|
55
|
+
|
|
56
|
+
- For any JSX based libraries, the @jsxImportSource directive must be at the top of the file.
|
|
57
|
+
- Preact:
|
|
58
|
+
|
|
59
|
+
```js
|
|
60
|
+
/** @jsxImportSource preact */
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
- React:
|
|
64
|
+
|
|
65
|
+
```js
|
|
66
|
+
/** @jsxImportSource react */
|
|
67
|
+
```
|
|
48
68
|
|
|
49
69
|
### Parameters
|
|
50
70
|
|
|
@@ -59,6 +79,54 @@ Astro slots can be sent in. A slot can be either the default one or the named on
|
|
|
59
79
|
|
|
60
80
|
Angular does not support the use of slots. Any use of slots with Angular should be discouraged.
|
|
61
81
|
|
|
82
|
+
##### Preact
|
|
83
|
+
|
|
84
|
+
- In Preact, slots are handled as props. The default slot is the `children` prop. A named slot will have the name of its slot as the parameter. For example, a slot with the following:
|
|
85
|
+
|
|
86
|
+
```js
|
|
87
|
+
<div slot="header">Header content</div>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
will have the parameter named header.
|
|
91
|
+
|
|
92
|
+
- The slots are then rendered using the regular React rendering parameter method. With the following Astro component:
|
|
93
|
+
|
|
94
|
+
```js
|
|
95
|
+
---
|
|
96
|
+
import CounterComponent from '../../framework/preact/Counter';
|
|
97
|
+
---
|
|
98
|
+
<CounterComponent client:only="preact">
|
|
99
|
+
<div slot="header">
|
|
100
|
+
Counter Component
|
|
101
|
+
</div>
|
|
102
|
+
<div style="text-align: center;">
|
|
103
|
+
<p>This is content passed into the component.</p>
|
|
104
|
+
</div>
|
|
105
|
+
</CounterComponent>
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
the slots can be used as:
|
|
109
|
+
|
|
110
|
+
```js
|
|
111
|
+
export default function Counter({
|
|
112
|
+
children,
|
|
113
|
+
header,
|
|
114
|
+
}: {
|
|
115
|
+
children: ComponentChildren;
|
|
116
|
+
header: ComponentChildren;
|
|
117
|
+
}) {
|
|
118
|
+
|
|
119
|
+
return (
|
|
120
|
+
<>
|
|
121
|
+
{header}
|
|
122
|
+
<div>
|
|
123
|
+
{children}
|
|
124
|
+
</div>
|
|
125
|
+
</>
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
62
130
|
##### React
|
|
63
131
|
|
|
64
132
|
- In React, slots are handled as props. The default slot is the `children` prop. A named slot will have the name of its slot as the parameter. For example, a slot with the following:
|
|
@@ -171,13 +239,32 @@ The OutSystems 11 library is called Lightweight State Manager - https://www.outs
|
|
|
171
239
|
|
|
172
240
|
The OutSystems Developer Cloud library is called Lightweight State Manager and is available in the ODC Forge.
|
|
173
241
|
|
|
174
|
-
Nano Stores are currently supported for only React - https://github.com/nanostores/react and Vue - https://github.com/nanostores/vue. The Angular 21 library does not yet support them.
|
|
242
|
+
Nano Stores are currently supported for only Preact - https://github.com/nanostores/preact, React - https://github.com/nanostores/react and Vue - https://github.com/nanostores/vue. The Angular 21 library does not yet support them.
|
|
175
243
|
|
|
176
244
|
In OutSystems, the store will be on the Window object. The Islands component will then have to access it from there.
|
|
177
245
|
|
|
246
|
+
#### Preact
|
|
247
|
+
|
|
248
|
+
```jsx
|
|
249
|
+
import { useStore } from "@nanostores/preact";
|
|
250
|
+
|
|
251
|
+
export default function Counter({}) {
|
|
252
|
+
const nanoStoreValue = useStore(window.Stores["MyGreatStore"]);
|
|
253
|
+
|
|
254
|
+
return (
|
|
255
|
+
<>
|
|
256
|
+
<div>
|
|
257
|
+
<strong>Nano Store value:</strong>
|
|
258
|
+
<div>{nanoStoreValue}</div>
|
|
259
|
+
</div>
|
|
260
|
+
</>
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
```
|
|
264
|
+
|
|
178
265
|
#### React
|
|
179
266
|
|
|
180
|
-
```
|
|
267
|
+
```jsx
|
|
181
268
|
import { useStore } from "@nanostores/react";
|
|
182
269
|
import { useState } from "react";
|
|
183
270
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
import angular from "@analogjs/astro-angular";
|
|
3
|
+
import preact from "@astrojs/preact";
|
|
3
4
|
import react from "@astrojs/react";
|
|
4
5
|
import svelte from "@astrojs/svelte";
|
|
5
6
|
import vue from "@astrojs/vue";
|
|
@@ -18,9 +19,19 @@ export default defineConfig({
|
|
|
18
19
|
},
|
|
19
20
|
},
|
|
20
21
|
}),
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
preact({
|
|
23
|
+
compat: true,
|
|
24
|
+
include: ["src/framework/preact/*"],
|
|
25
|
+
}),
|
|
26
|
+
react({
|
|
27
|
+
include: ["src/framework/react/*"],
|
|
28
|
+
}),
|
|
29
|
+
svelte({
|
|
30
|
+
include: ["src/framework/svelte/*"],
|
|
31
|
+
}),
|
|
32
|
+
vue({
|
|
33
|
+
include: ["src/framework/vue/*"],
|
|
34
|
+
}),
|
|
24
35
|
],
|
|
25
36
|
server: {
|
|
26
37
|
host: true,
|