@@ -28,7 +28,6 @@ module.exports = env => {
2828
2929 // Default destination inside platforms/<platform>/...
3030 const dist = resolve ( projectRoot , nsWebpack . getAppPath ( platform , projectRoot ) ) ;
31- const appResourcesPlatformDir = platform === "android" ? "Android" : "iOS" ;
3231
3332 const {
3433 // The 'appPath' and 'appResourcesPath' values are fetched from
@@ -73,6 +72,7 @@ module.exports = env => {
7372 itemsToClean . push ( `${ join ( projectRoot , "platforms" , "android" , "app" , "build" , "configurations" , "nativescript-android-snapshot" ) } ` ) ;
7473 }
7574
75+ nsWebpack . processAppComponents ( appComponents , platform ) ;
7676 const config = {
7777 mode : production ? "production" : "development" ,
7878 context : appFullPath ,
@@ -133,6 +133,7 @@ module.exports = env => {
133133 test : ( module , chunks ) => {
134134 const moduleName = module . nameForCondition ? module . nameForCondition ( ) : '' ;
135135 return / [ \\ / ] n o d e _ m o d u l e s [ \\ / ] / . test ( moduleName ) ||
136+ / [ \\ / ] t n s - c o r e - m o d u l e s [ \\ / ] / . test ( moduleName ) || // <-- Needed for snapshot builds with linked modules!
136137 appComponents . some ( comp => comp === moduleName ) ;
137138
138139 } ,
@@ -179,13 +180,14 @@ module.exports = env => {
179180 unitTesting,
180181 appFullPath,
181182 projectRoot,
183+ ignoredFiles : nsWebpack . getUserDefinedEntries ( entries , platform )
182184 }
183185 } ,
184186 ] . filter ( loader => ! ! loader )
185187 } ,
186-
188+
187189 {
188- test : / \. ( t s | c s s | s c s s | l e s s | h t m l | x m l ) $ / ,
190+ test : / \. ( t s | c s s | s c s s | h t m l | x m l ) $ / ,
189191 use : "nativescript-dev-webpack/hmr/hot-loader"
190192 } ,
191193
@@ -227,7 +229,7 @@ module.exports = env => {
227229 // Define useful constants like TNS_WEBPACK
228230 new webpack . DefinePlugin ( {
229231 "global.TNS_WEBPACK" : "true" ,
230- "process" : undefined ,
232+ "process" : "global.process" ,
231233 } ) ,
232234 // Remove all files from the out dir.
233235 new CleanWebpackPlugin ( itemsToClean , { verbose : ! ! verbose } ) ,
0 commit comments