fix(web): remove default value of baseHref (#6994)

close #5079
This commit is contained in:
Xie Jay 2021-10-05 02:50:26 +08:00 committed by GitHub
parent 9c2a8b155c
commit 2bcc552fa0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 5 additions and 8 deletions

View File

@ -32,8 +32,6 @@ List of static application assets.
### baseHref
Default: `/`
Type: `string`
Base url for the application being built.

View File

@ -32,8 +32,6 @@ List of static application assets.
### baseHref
Default: `/`
Type: `string`
Base url for the application being built.

View File

@ -32,8 +32,6 @@ List of static application assets.
### baseHref
Default: `/`
Type: `string`
Base url for the application being built.

View File

@ -253,6 +253,7 @@ Object {
assets: ['apps/my-app/src/favicon.ico', 'apps/my-app/src/assets'],
index: 'apps/my-app/src/index.html',
main: 'apps/my-app/src/main.tsx',
baseHref: '/',
outputPath: 'dist/apps/my-app',
polyfills: 'apps/my-app/src/polyfills.ts',
scripts: [],

View File

@ -46,6 +46,7 @@ function createBuildTarget(options: NormalizedSchema): TargetConfiguration {
options: {
outputPath: joinPathFragments('dist', options.appProjectRoot),
index: joinPathFragments(options.appProjectRoot, 'src/index.html'),
baseHref: '/',
main: joinPathFragments(
options.appProjectRoot,
maybeJs(options, `src/main.tsx`)

View File

@ -32,8 +32,7 @@
},
"baseHref": {
"type": "string",
"description": "Base url for the application being built.",
"default": "/"
"description": "Base url for the application being built."
},
"deployUrl": {
"type": "string",

View File

@ -258,6 +258,7 @@ describe('app', () => {
expect(architectConfig.build.options).toEqual({
assets: ['apps/my-app/src/favicon.ico', 'apps/my-app/src/assets'],
index: 'apps/my-app/src/index.html',
baseHref: '/',
main: 'apps/my-app/src/main.ts',
outputPath: 'dist/apps/my-app',
polyfills: 'apps/my-app/src/polyfills.ts',

View File

@ -54,6 +54,7 @@ function addBuildTarget(
const buildOptions: WebBuildBuilderOptions = {
outputPath: joinPathFragments('dist', options.appProjectRoot),
index: joinPathFragments(options.appProjectRoot, 'src/index.html'),
baseHref: '/',
main: joinPathFragments(options.appProjectRoot, 'src/main.ts'),
polyfills: joinPathFragments(options.appProjectRoot, 'src/polyfills.ts'),
tsConfig: joinPathFragments(options.appProjectRoot, 'tsconfig.app.json'),