File tree 2 files changed +8
-6
lines changed
packages/angular_devkit/build_webpack/src
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 6
6
* found in the LICENSE file at https://angular.io/license
7
7
*/
8
8
import { BuilderContext , createBuilder } from '@angular-devkit/architect' ;
9
- import { getSystemPath , json , normalize , resolve } from '@angular-devkit/core' ;
9
+ import { json } from '@angular-devkit/core' ;
10
10
import * as net from 'net' ;
11
+ import { resolve as pathResolve } from 'path' ;
11
12
import { Observable , from , isObservable , of } from 'rxjs' ;
12
13
import { switchMap } from 'rxjs/operators' ;
13
14
import * as webpack from 'webpack' ;
@@ -112,9 +113,9 @@ export function runWebpackDevServer(
112
113
export default createBuilder <
113
114
json . JsonObject & WebpackDevServerBuilderSchema , DevServerBuildOutput
114
115
> ( ( options , context ) => {
115
- const configPath = resolve ( normalize ( context . workspaceRoot ) , normalize ( options . webpackConfig ) ) ;
116
+ const configPath = pathResolve ( context . workspaceRoot , options . webpackConfig ) ;
116
117
117
- return from ( import ( getSystemPath ( configPath ) ) ) . pipe (
118
+ return from ( import ( configPath ) ) . pipe (
118
119
switchMap ( ( config : webpack . Configuration ) => runWebpackDevServer ( config , context ) ) ,
119
120
) ;
120
121
} ) ;
Original file line number Diff line number Diff line change 6
6
* found in the LICENSE file at https://angular.io/license
7
7
*/
8
8
import { BuilderContext , BuilderOutput , createBuilder } from '@angular-devkit/architect' ;
9
- import { getSystemPath , json , normalize , resolve } from '@angular-devkit/core' ;
9
+ import { json } from '@angular-devkit/core' ;
10
+ import { resolve as pathResolve } from 'path' ;
10
11
import { Observable , from , isObservable , of } from 'rxjs' ;
11
12
import { switchMap } from 'rxjs/operators' ;
12
13
import * as webpack from 'webpack' ;
@@ -110,9 +111,9 @@ export function runWebpack(
110
111
111
112
112
113
export default createBuilder < WebpackBuilderSchema > ( ( options , context ) => {
113
- const configPath = resolve ( normalize ( context . workspaceRoot ) , normalize ( options . webpackConfig ) ) ;
114
+ const configPath = pathResolve ( context . workspaceRoot , options . webpackConfig ) ;
114
115
115
- return from ( import ( getSystemPath ( configPath ) ) ) . pipe (
116
+ return from ( import ( configPath ) ) . pipe (
116
117
switchMap ( ( config : webpack . Configuration ) => runWebpack ( config , context ) ) ,
117
118
) ;
118
119
} ) ;
You can’t perform that action at this time.
0 commit comments