File tree Expand file tree Collapse file tree
packages/angular_devkit/build_angular/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,10 +82,11 @@ async function _renderUniversal(
8282 localeDirectory ,
8383 ) ;
8484
85+ const route = options . route ;
8586 let html : string = await renderWorker . run ( {
8687 serverBundlePath,
8788 document : indexHtml ,
88- url : options . route ,
89+ url : route ?. [ 0 ] === '/' ? route : '/' + route ,
8990 } ) ;
9091
9192 // Overwrite the client index file.
Original file line number Diff line number Diff line change @@ -209,7 +209,7 @@ async function _renderUniversal(
209209 inlineCriticalCss : ! ! normalizedStylesOptimization . inlineCritical ,
210210 minifyCss : ! ! normalizedStylesOptimization . minify ,
211211 outputPath,
212- route,
212+ route : route [ 0 ] === '/' ? route : '/' + route ,
213213 serverBundlePath,
214214 } ;
215215
Original file line number Diff line number Diff line change 99import type { ObjectPattern } from 'copy-webpack-plugin' ;
1010import glob from 'fast-glob' ;
1111import { createHash } from 'node:crypto' ;
12+ import { createRequire } from 'node:module' ;
1213import * as path from 'node:path' ;
1314import type { Configuration , WebpackOptionsNormalized } from 'webpack' ;
1415import {
@@ -314,7 +315,8 @@ export function getStatsOptions(verbose = false): WebpackStatsOptions {
314315 */
315316export function isPackageInstalled ( root : string , name : string ) : boolean {
316317 try {
317- require . resolve ( name , { paths : [ root ] } ) ;
318+ const resolve = createRequire ( root + '/' ) . resolve ;
319+ resolve ( name ) ;
318320
319321 return true ;
320322 } catch {
You can’t perform that action at this time.
0 commit comments