Skip to content

Commit

Permalink
chore(demo): use baseHref=/ instead of baseHref=./ (#8526)
Browse files Browse the repository at this point in the history
  • Loading branch information
nsbarsukov authored Aug 14, 2024
1 parent fb150f8 commit 9ad873b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: taiga-family/ci/actions/setup/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- run: npx nx build demo --base-href='/'
- run: npx nx build demo
- name: Debug output
run: tree dist/demo/browser -P '*.html'
- name: Deploy preview
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: taiga-family/ci/actions/setup/[email protected]

- name: Building demo-app of git-branch without cache
run: npx nx build demo -c next --output-path ${{ env.DIST }} --base-href='/'
run: npx nx build demo -c next --output-path ${{ env.DIST }}

- name: Upload cache / ${{ env.CACHE_DIST_KEY }}
uses: actions/cache/[email protected]
Expand Down Expand Up @@ -129,6 +129,7 @@ jobs:
--branch snapshots/demo/next/${{ github.base_ref }} \
https://github.com/taiga-family/taiga-ui.git ${{ env.DIST_NEXT }}
# TODO: delete this step after merging of https://github.com/taiga-family/taiga-ui/pull/8526 (after snapshot update)
- name: Find and replace baseHref for next snapshot
uses: jacobtomlinson/gha-find-replace@v3
with:
Expand Down
10 changes: 2 additions & 8 deletions projects/demo/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"output": "assets/taiga-ui/icons"
}
],
"baseHref": "./",
"baseHref": "/",
"styles": [
"{projectRoot}/src/normalize.less",
"{projectRoot}/src/styles.less",
Expand Down Expand Up @@ -91,11 +91,8 @@
"statsJson": false,
"progress": false
},
"development": {
"baseHref": "/"
},
"development": {},
"def": {
"baseHref": "/",
"fileReplacements": [
{
"replace": "{projectRoot}/src/emulate/change-detection-strategy.ts",
Expand All @@ -104,7 +101,6 @@
]
},
"shadow": {
"baseHref": "/",
"fileReplacements": [
{
"replace": "{projectRoot}/src/emulate/view-encapsulation.ts",
Expand All @@ -113,13 +109,11 @@
]
},
"fast": {
"baseHref": "/",
"sourceMap": false,
"namedChunks": false,
"statsJson": false
},
"coalescing": {
"baseHref": "/",
"fileReplacements": [
{
"replace": "{projectRoot}/src/emulate/ng-zone-options.ts",
Expand Down
3 changes: 2 additions & 1 deletion projects/demo/src/modules/app/app.providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ export const APP_PROVIDERS: Provider[] = [
{
provide: APP_BASE_HREF,
// @note: By default, on webcontainer.io will not be provided APP_BASE_HREF, we use fallback
useFactory: () => inject(DOCUMENT).querySelector('base')?.href || '/',
useFactory: () =>
inject(DOCUMENT).querySelector('base')?.getAttribute('href') || '/',
},
{
provide: TUI_IS_PLAYWRIGHT,
Expand Down

0 comments on commit 9ad873b

Please sign in to comment.