mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-17 02:54:21 +08:00
fix(@angular-devkit/build-angular): fix check for absolute paths in windows in server config
This changes fixes `Error: You must pass in a NgModule or NgModuleFactory to be bootstrapped`. At the moment the check for absolute path is not correct for windows. Fixes #13865 and fixes https://github.com/angular/universal/issues/1139
This commit is contained in:
parent
d841b3771e
commit
901042d95b
@ -5,6 +5,7 @@
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
import { isAbsolute } from 'path';
|
||||
import { Configuration } from 'webpack';
|
||||
import { WebpackConfigOptions } from '../build-options';
|
||||
import { getSourceMapDevTool } from './utils';
|
||||
@ -38,7 +39,7 @@ export function getServerConfig(wco: WebpackConfigOptions) {
|
||||
/^@angular/,
|
||||
(context: string, request: string, callback: (error?: null, result?: string) => void) => {
|
||||
// Absolute & Relative paths are not externals
|
||||
if (request.match(/^\.{0,2}\//)) {
|
||||
if (/^\.{0,2}\//.test(request) || isAbsolute(request)) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user