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

Unable to disable <base> tag with NxAppWebpackPlugin #30291

Open
1 of 4 tasks
ericbf opened this issue Mar 6, 2025 · 0 comments
Open
1 of 4 tasks

Unable to disable <base> tag with NxAppWebpackPlugin #30291

ericbf opened this issue Mar 6, 2025 · 0 comments

Comments

@ericbf
Copy link

ericbf commented Mar 6, 2025

Current Behavior

If baseHref is not set, or set to undefined, the generated html file has a <base href="/"> in it.

Expected Behavior

If baseHref is not set, or set to undefined, the generated html file should have no <base> tag.

GitHub Repo

https://github.com/ericbf/nx-webpack-base-tag

Steps to Reproduce

  1. pnpm install
  2. nx webpack:build my-app
  3. Check dist/apps/my-app/index.html and see the <base href="/">

Nx Report

Node           : 22.2.0
OS             : darwin-arm64
Native Target  : aarch64-macos
pnpm           : 9.12.1

nx (global)            : 20.0.0
nx                     : 20.4.0-beta.2
@nx/js                 : 20.4.0-beta.2
@nx/jest               : 20.4.0-beta.2
@nx/eslint             : 20.4.0-beta.2
@nx/workspace          : 20.4.0-beta.2
@nx/angular            : 20.4.0-beta.2
@nx/cypress            : 20.4.0-beta.2
@nx/devkit             : 20.4.0-beta.2
@nx/eslint-plugin      : 20.4.0-beta.2
@nx/module-federation  : 20.4.0-beta.2
@nx/react              : 20.4.0-beta.2
@nx/web                : 20.4.0-beta.2
@nx/webpack            : 20.4.0-beta.2
typescript             : 5.7.3
---------------------------------------
Registered Plugins:
@nx/eslint/plugin
@nx/cypress/plugin
@nx/jest/plugin
@nx/webpack/plugin
---------------------------------------
Community plugins:
@ngrx/component-store : 19.0.0
@ngrx/effects         : 19.0.0
@ngrx/entity          : 19.0.0
@ngrx/operators       : 19.0.0
@ngrx/router-store    : 19.0.0
@ngrx/store           : 19.0.0
@ngrx/store-devtools  : 19.0.0

Failure Logs

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

This seems to be a regression of a few issues:

Leaving baseHref unset or set to null/undefined should result in no base tag in the resultant html.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant