File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -27,11 +27,12 @@ function _removeDecorators(fileName: string, source: string): string {
27
27
28
28
29
29
function _replaceBootstrap ( fileName : string , source : string , plugin : NgcWebpackPlugin ) {
30
- const basePath = plugin . angularCompilerOptions . basePath ;
31
- const entryModuleFileName = plugin . entryModule . split ( '#' ) [ 0 ] + '.ngfactory' ;
30
+ const basePath = path . normalize ( plugin . angularCompilerOptions . basePath ) ;
31
+ const entryModuleFileName = path . normalize ( plugin . entryModule . split ( '#' ) [ 0 ] + '.ngfactory' ) ;
32
32
const relativeEntryModulePath = path . relative ( basePath , entryModuleFileName ) ;
33
33
const fullEntryModulePath = path . resolve ( plugin . genDir , relativeEntryModulePath ) ;
34
- const ngFactoryPath = './' + path . relative ( path . dirname ( fileName ) , fullEntryModulePath ) ;
34
+ const relativeNgFactoryPath = path . relative ( path . dirname ( fileName ) , fullEntryModulePath ) ;
35
+ const ngFactoryPath = './' + relativeNgFactoryPath . replace ( / \\ / g, '/' ) ;
35
36
36
37
return source
37
38
. replace ( / ( i m p o r t .* ) \b p l a t f o r m B r o w s e r D y n a m i c \b ( .* \/ ) p l a t f o r m - b r o w s e r - d y n a m i c ( \b .* ) $ / m,
You can’t perform that action at this time.
0 commit comments