Commit f9d48c2
committed
fix(@angular/build): allow serving node_modules assets in monorepo setups
In monorepo setups where node_modules are hoisted to a parent directory
above the Angular workspace root, assets loaded from those packages
(e.g., fonts from CSS files) were blocked by Vite's dev server with a
403 error.
This was caused by the explicit `server.fs.allow` configuration only
including the workspace root's `node_modules`, which overrides Vite's
default package root detection. By adding `searchForPackageRoot()` to
the allow list, the monorepo root directory is included, allowing access
to hoisted node_modules.
Fixes angular#310161 parent 7fbc715 commit f9d48c2
1 file changed
Lines changed: 4 additions & 1 deletion
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
| 83 | + | |
81 | 84 | | |
82 | 85 | | |
83 | 86 | | |
| |||
0 commit comments