Skip to content
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

AUS-3839: Set build output to angular standard ./dist and index.html #264

Merged
merged 1 commit into from
May 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"options": {
"preserveSymlinks": true,
"aot": true,
"outputPath": "../ng",
"index": "src/index.htm",
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts",
Expand Down
4 changes: 2 additions & 2 deletions docker/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]

# If the requested resource doesn't exist, use index.htm
RewriteRule ^ /index.htm
# If the requested resource doesn't exist, use index.html
RewriteRule ^ /index.html
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ ENV appdir /usr/src/app
WORKDIR ${appdir}

# Copy in the static website files from first image
COPY --chown=www-data:www-data --from=node /usr/src/ng /var/www/html/
COPY --chown=www-data:www-data --from=node /usr/src/app/dist /var/www/html/

# Copy .htaccess to allow redirects to non-root routes work
COPY --chown=www-data:www-data docker/.htaccess /var/www/html/
Expand Down
2 changes: 1 addition & 1 deletion src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const baseUrl = environment.portalBaseUrl.replace(/^\/|\/$/g, '');
*/
const routes: Routes = [
{ path: '', pathMatch: 'full', component: PortalComponent },
{ path: 'index.htm', pathMatch: 'full', component: PortalComponent }, // redirect states from index.htm
{ path: 'index.html', pathMatch: 'full', component: PortalComponent }, // redirect states from index.html
{ path: 'login', component: LoginComponent },
{ path: 'login/loggedIn', component: LoggedInComponent },
{ path: baseUrl, redirectTo: '/', pathMatch: 'full' },
Expand Down
File renamed without changes.