-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Angular 18's new build tool [using Vite] no longer puts index.html and friends in root #189
Comments
Ok, so they have changed the folder structure again??? 😭 |
Ok, looks like the folder structure is still the same as in v17? So I assume your issue was caused by a wrong version of angular-cli-ghpages, that was picked up by npm. I crafted a new version for v18. Please try out |
@JohannesHoppe No not the same folder structure; make sure when you run |
I'm confused. I just generated a new Angular 18 app, and got the expected folder Does the |
No it doesn't; here is my GitHub Action BTW - https://github.com/offscale/offscale-www/blob/master/.github/workflows/main.yml I actually like the new files in the |
@SamuelMarks I tried to reproduce what you explained. The folder structure changed with the ESBuild/Vite-based builder a while back, but it doesn't seem to me that there are any changes with v18. |
Try at $ git clone --depth=1 --single-branch https://github.com/offscale/offscale-www
$ npm i
$ ng build --configuration production
$ tree -L 3 dist
dist
└── offscale-www
├── 3rdpartylicenses.txt
└── browser
├── assets
├── chunk-BCOX42N7.js
├── chunk-LKZQ5FFA.js
├── favicon.ico
├── index.html
├── main-FD5JBKE7.js
├── polyfills-MAT6ZQ6R.js
└── styles-YEIHJPKY.css
4 directories, 8 files |
This file structure is exactly how it's supposed to be. The |
I just tried to repeoduce this again:
The difference to your CI workflow is the path under the |
Yes that would work; but before it didn't need the |
@fmalcher Just updated another one of my sites, here is the helpful text during
|
We discussed this a few months back when the change was introduced: #173 To support all possible constellations of builders and output paths, the easiest and most flexible solution was to use "dir" everywhere it deviates from the standard folder (of the Webpack-based builder). As soon as the application builder is the only officially supported builder we can consider to make the "browser" subfolder the default. |
I created a separate issue for the last aspect of my answer: #190 |
My GitHub Actions now looks like this:
You might need to reconfigure
ngx
to work with thebrowser
subdirectory if noindex.html
is found in the root (thereby taking care of both cases).The text was updated successfully, but these errors were encountered: