File tree Expand file tree Collapse file tree 3 files changed +34
-34
lines changed
Expand file tree Collapse file tree 3 files changed +34
-34
lines changed Original file line number Diff line number Diff line change 1+ require ( "globals" ) ;
12var profiling = require ( './profiling' ) ;
23profiling . start ( 'application-start' ) ;
34
45var reflectMetadata = require ( "reflect-metadata" ) ;
5- var global = require ( "globals" ) ;
6- var page = require ( "ui/page" ) ;
7- console . log ( 'page module: ' + page ) ;
86
7+ //var page = require("ui/page");
8+ //console.log('page module: ' + page);
99var application = require ( "application" ) ;
1010application . on ( application . launchEvent , function ( ) {
1111 //console.log('launched!');
1212 //profiling.stop('application-start');
1313} ) ;
1414
15- var moduleLoader = require ( "utils/module-loader" ) ;
16- moduleLoader . registerModule ( "./main-page" , function ( ) { return require ( "./main-page" ) ; } ) ;
15+ global . registerModule ( "./main-page" , function ( ) { return require ( "./main-page" ) ; } ) ;
1716
1817application . mainModule = "./main-page" ;
1918application . cssFile = "./app.css" ;
Original file line number Diff line number Diff line change 11{
2- "nativescript" : {
3- "id" : " org.nativescript.startuptest" ,
4- "tns-android" : {
5- "version" : " 1.5.0"
6- }
7- },
8- "dependencies" : {
9- "@reactivex/rxjs" : " 5.0.0-alpha.7" ,
10- "parse5" : " 1.4.2" ,
11- "punycode" : " 1.3.2" ,
12- "querystring" : " 0.2.0" ,
13- "url" : " 0.10.3" ,
14- "reflect-metadata" : " 0.1.2" ,
15- "zone.js" : " 0.5.8"
16- },
17- "devDependencies" : {
18- "shelljs" : " ^0.5.3"
19- }
20- }
2+ "nativescript" : {
3+ "id" : " org.nativescript.startuptest" ,
4+ "tns-android" : {
5+ "version" : " 1.5.0"
6+ }
7+ },
8+ "dependencies" : {
9+ "@reactivex/rxjs" : " 5.0.0-alpha.7" ,
10+ "parse5" : " 1.4.2" ,
11+ "punycode" : " 1.3.2" ,
12+ "querystring" : " 0.2.0" ,
13+ "url" : " 0.10.3" ,
14+ "reflect-metadata" : " 0.1.2" ,
15+ "zone.js" : " 0.5.8"
16+ },
17+ "devDependencies" : {
18+ "shelljs" : " ^0.5.3" ,
19+ "webpack" : " ^1.12.9"
20+ }
21+ }
Original file line number Diff line number Diff line change 11var path = require ( "path" ) ;
2+ var webpack = require ( "webpack" ) ;
3+
24
35module . exports = {
46 context : "./platforms/android/src/main/assets/app" ,
@@ -11,16 +13,8 @@ module.exports = {
1113 libraryTarget : "commonjs2" ,
1214 filename : "bundle.js"
1315 } ,
14- //externals: {
15- //"crypto": "crypto",
16- //"process/browser.js": "process",
17- //"module.js": "module"
18- //},
1916 externals : [
2017 function ( context , request , callback ) {
21- //if (/\/module\.js$/.test(request))
22- //return callback(null, "var module");
23- //else if (/browserify|crypto/.test(request)) {
2418 if ( / b r o w s e r i f y | c r y p t o / . test ( request ) ) {
2519 return callback ( null , "var {}" ) ;
2620 } else {
@@ -38,5 +32,11 @@ module.exports = {
3832 module : {
3933 loaders : [
4034 ]
41- }
42- }
35+ } ,
36+ plugins : [
37+ new webpack . DefinePlugin ( {
38+ global : 'global' ,
39+ __dirname : '__dirname'
40+ } ) ,
41+ ]
42+ } ;
You can’t perform that action at this time.
0 commit comments