File tree 2 files changed +10
-8
lines changed
2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ import {
15
15
import { BrowserBuilderOptions } from '@angular-devkit/build-angular' ;
16
16
import { normalizeOptimization } from '@angular-devkit/build-angular/src/utils/normalize-optimization' ;
17
17
import { augmentAppWithServiceWorker } from '@angular-devkit/build-angular/src/utils/service-worker' ;
18
- import { normalize , resolve as resolvePath } from '@angular-devkit/core' ;
19
18
import * as fs from 'fs' ;
20
19
import ora from 'ora' ;
21
20
import * as path from 'path' ;
@@ -92,9 +91,11 @@ async function _renderUniversal(
92
91
throw new Error ( 'The builder requires a target.' ) ;
93
92
}
94
93
95
- const root = normalize ( context . workspaceRoot ) ;
96
94
const projectMetadata = await context . getProjectMetadata ( projectName ) ;
97
- const projectRoot = resolvePath ( root , normalize ( ( projectMetadata . root as string ) || '' ) ) ;
95
+ const projectRoot = path . join (
96
+ context . workspaceRoot ,
97
+ ( projectMetadata . root as string | undefined ) ?? '' ,
98
+ ) ;
98
99
99
100
// Users can specify a different base html file e.g. "src/home.html"
100
101
const indexFile = getIndexOutputFile ( browserOptions ) ;
@@ -160,7 +161,7 @@ async function _renderUniversal(
160
161
await augmentAppWithServiceWorker (
161
162
projectRoot ,
162
163
context . workspaceRoot ,
163
- normalize ( outputPath ) ,
164
+ outputPath ,
164
165
browserOptions . baseHref || '/' ,
165
166
browserOptions . ngswConfigPath ,
166
167
) ;
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ import {
15
15
import { BrowserBuilderOptions , BrowserBuilderOutput } from '@angular-devkit/build-angular' ;
16
16
import { normalizeOptimization } from '@angular-devkit/build-angular/src/utils/normalize-optimization' ;
17
17
import { augmentAppWithServiceWorker } from '@angular-devkit/build-angular/src/utils/service-worker' ;
18
- import { normalize , resolve } from '@angular-devkit/core' ;
19
18
import express from 'express' ;
20
19
import * as http from 'http' ;
21
20
import ora from 'ora' ;
@@ -145,14 +144,16 @@ async function generateServiceWorker(
145
144
throw new Error ( 'The builder requires a target.' ) ;
146
145
}
147
146
148
- const root = normalize ( context . workspaceRoot ) ;
149
147
const projectMetadata = await context . getProjectMetadata ( projectName ) ;
150
- const projectRoot = resolve ( root , normalize ( ( projectMetadata . root as string ) ?? '' ) ) ;
148
+ const projectRoot = path . join (
149
+ context . workspaceRoot ,
150
+ ( projectMetadata . root as string | undefined ) ?? '' ,
151
+ ) ;
151
152
152
153
await augmentAppWithServiceWorker (
153
154
projectRoot ,
154
155
context . workspaceRoot ,
155
- normalize ( outputPath ) ,
156
+ outputPath ,
156
157
browserOptions . baseHref || '/' ,
157
158
browserOptions . ngswConfigPath ,
158
159
) ;
You can’t perform that action at this time.
0 commit comments