This repository was archived by the owner on Aug 7, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +15
-19
lines changed Expand file tree Collapse file tree 1 file changed +15
-19
lines changed Original file line number Diff line number Diff line change @@ -101,25 +101,21 @@ export function mapFileSystem(args: MapFileSystemArgs): any {
101101 const { dir, name, ext} = parseFile ( file ) ;
102102 let platformFilePath = join ( dir , `${ name } .${ platform } ${ ext } ` ) ;
103103
104- try {
105- require . resolve ( platformFilePath ) ;
106- } catch ( e ) {
107- if ( isExternal && dir . indexOf ( "/@nativescript/core/" ) !== - 1 ) {
108- let replacedPath ;
109- try {
110- replacedPath = dir . replace (
111- / n o d e _ m o d u l e s ( \/ [ ^ / ] + ) ? \/ @ n a t i v e s c r i p t \/ c o r e / ,
112- `node_modules/nativescript-platform-${ platform } `
113- ) ;
114-
115- platformFilePath = require . resolve ( join ( replacedPath , `${ name } .${ platform } ${ ext } ` ) ) ;
116- } catch ( e ) {
117- if ( replacedPath ) {
118- if ( ext === ".d" ) {
119- platformFilePath = undefined ;
120- } else {
121- platformFilePath = join ( replacedPath , `${ name } ${ ext } ` ) ;
122- }
104+ if ( isExternal && dir . indexOf ( "/@nativescript/core/" ) !== - 1 ) {
105+ let replacedPath ;
106+ try {
107+ replacedPath = dir . replace (
108+ / n o d e _ m o d u l e s ( \/ [ ^ / ] + ) ? \/ @ n a t i v e s c r i p t \/ c o r e / ,
109+ `node_modules/nativescript-platform-${ platform } `
110+ ) ;
111+
112+ platformFilePath = require . resolve ( join ( replacedPath , `${ name } .${ platform } ${ ext } ` ) ) ;
113+ } catch ( e ) {
114+ if ( replacedPath ) {
115+ if ( ext === ".d" ) {
116+ platformFilePath = undefined ;
117+ } else {
118+ platformFilePath = join ( replacedPath , `${ name } ${ ext } ` ) ;
123119 }
124120 }
125121 }
You can’t perform that action at this time.
0 commit comments