Commit f4584fa
authored
fix[angular-gen2]: only use the edge runtime when the edge build is imported (#4152)
## Description
As we are skipping hydration due to limitations with how we generate
dynamic components we have to run eval twice - once on the server and
once on the browser. The edge build was working and edge-runtime was
being used but on the browser load it was fallbacking to use the browser
runtime which was leading to the unsafe-eval errors. This PR fixes the
issue by using edge-runtime both in the server and the browser - we will
only use the edge build when users import it using:
```ts
import { Content, type BuilderContent } from "@builder.io/sdk-angular/bundle/edge";
```
Jira
https://builder-io.atlassian.net/browse/ENG-10322
Screenshot
<img width="2555" height="690" alt="image"
src="https://github.com/user-attachments/assets/618bc9b2-e530-4547-b504-16c4be1ff369"
/>1 parent 3bb0e55 commit f4584fa
File tree
2 files changed
+29
-0
lines changed- .changeset
- packages/sdks/output/angular/scripts
2 files changed
+29
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
65 | 89 | | |
66 | 90 | | |
67 | 91 | | |
| |||
0 commit comments