@analogjs/astro-angular 1.13.0-beta.4 → 1.13.1-beta.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 +21 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -132,6 +132,27 @@ export default defineConfig({
|
|
|
132
132
|
});
|
|
133
133
|
```
|
|
134
134
|
|
|
135
|
+
### Filtering File Transforms
|
|
136
|
+
|
|
137
|
+
For better compatibility when integrating with other plugins such as [Starlight](https://starlight.astro.build), put the Angular components in a specific folder and use the `transformFilter` callback function to only transform those files.
|
|
138
|
+
|
|
139
|
+
```js
|
|
140
|
+
import { defineConfig } from 'astro/config';
|
|
141
|
+
import angular from '@analogjs/astro-angular';
|
|
142
|
+
|
|
143
|
+
export default defineConfig({
|
|
144
|
+
integrations: [
|
|
145
|
+
angular({
|
|
146
|
+
vite: {
|
|
147
|
+
transformFilter: (_code, id) => {
|
|
148
|
+
return id.includes('src/components'); // <- only transform Angular TypeScript files
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
}),
|
|
152
|
+
],
|
|
153
|
+
});
|
|
154
|
+
```
|
|
155
|
+
|
|
135
156
|
### Transforming Packages for SSR Compatibility
|
|
136
157
|
|
|
137
158
|
To ensure Angular libraries are transformed during Astro's SSR process, add them to the `ssr.noExternal` array in the Vite config.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@analogjs/astro-angular",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.1-beta.1",
|
|
4
4
|
"description": "Use Angular components within Astro",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Brandon Roberts <robertsbt@gmail.com>",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"url": "https://github.com/sponsors/brandonroberts"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@analogjs/vite-plugin-angular": "^1.13.
|
|
35
|
+
"@analogjs/vite-plugin-angular": "^1.13.1-beta.1"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@angular-devkit/build-angular": ">=16.0.0",
|