@@ -107,23 +107,26 @@ export function getCommonConfig(wco: WebpackConfigOptions) {
107
107
108
108
if ( ! asset . allowOutsideOutDir ) {
109
109
const message = 'An asset cannot be written to a location outside of the output path. '
110
- + 'You can override this message by setting the `allowOutsideOutDir` '
111
- + 'property on the asset to true in the CLI configuration.' ;
110
+ + 'You can override this message by setting the `allowOutsideOutDir` '
111
+ + 'property on the asset to true in the CLI configuration.' ;
112
112
throw new SilentError ( message ) ;
113
113
}
114
114
}
115
115
116
116
// Prevent asset configurations from reading files outside of the project.
117
117
const projectRelativeInput = path . relative ( projectRoot , asset . input ) ;
118
- if ( ( projectRelativeInput . startsWith ( '..' ) || path . isAbsolute ( projectRelativeInput ) ) && ! asset . allowOutsideReadDir ) {
118
+ if ( ( projectRelativeInput . startsWith ( '..' ) || path . isAbsolute ( projectRelativeInput ) )
119
+ && ! asset . allowOutsideReadDir ) {
120
+
119
121
const message = `${ asset . input } cannot be read from a location outside the project.`
120
- + 'You can override this message by setting the `allowOutsideReadDir` '
121
- + 'property on the asset to true in the CLI configuration.' ;
122
- throw new SilentError ( message ) ;
122
+ + 'You can override this message by setting the `allowOutsideReadDir` '
123
+ + 'property on the asset to true in the CLI configuration.' ;
124
+ throw new SilentError ( message ) ;
123
125
}
124
126
125
- if ( asset . allowOutsideOutDir ) {
126
- console . log ( chalk . yellow ( 'The allowOutsideOutDir option is on that could be a security risk' ) ) ;
127
+ if ( asset . allowOutsideReadDir ) {
128
+ console . log ( chalk . yellow ( 'The allowOutsideReadDir option'
129
+ + ' is on that could be a security risk' ) ) ;
127
130
}
128
131
129
132
// Ensure trailing slash.
@@ -197,7 +200,8 @@ export function getCommonConfig(wco: WebpackConfigOptions) {
197
200
: 'rxjs/_esm5/path-mapping' ;
198
201
const rxPaths = requireProjectModule ( projectRoot , rxjsPathMappingImport ) ;
199
202
alias = rxPaths ( nodeModules ) ;
200
- } catch ( e ) { }
203
+ } catch ( e ) {
204
+ }
201
205
202
206
// Allow loaders to be in a node_modules nested inside the CLI package
203
207
const loaderNodeModules = [ 'node_modules' ] ;
0 commit comments