File tree 3 files changed +34
-34
lines changed
3 files changed +34
-34
lines changed Original file line number Diff line number Diff line change
1
+ require ( "globals" ) ;
1
2
var profiling = require ( './profiling' ) ;
2
3
profiling . start ( 'application-start' ) ;
3
4
4
5
var reflectMetadata = require ( "reflect-metadata" ) ;
5
- var global = require ( "globals" ) ;
6
- var page = require ( "ui/page" ) ;
7
- console . log ( 'page module: ' + page ) ;
8
6
7
+ //var page = require("ui/page");
8
+ //console.log('page module: ' + page);
9
9
var application = require ( "application" ) ;
10
10
application . on ( application . launchEvent , function ( ) {
11
11
//console.log('launched!');
12
12
//profiling.stop('application-start');
13
13
} ) ;
14
14
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" ) ; } ) ;
17
16
18
17
application . mainModule = "./main-page" ;
19
18
application . cssFile = "./app.css" ;
Original file line number Diff line number Diff line change 1
1
{
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 1
1
var path = require ( "path" ) ;
2
+ var webpack = require ( "webpack" ) ;
3
+
2
4
3
5
module . exports = {
4
6
context : "./platforms/android/src/main/assets/app" ,
@@ -11,16 +13,8 @@ module.exports = {
11
13
libraryTarget : "commonjs2" ,
12
14
filename : "bundle.js"
13
15
} ,
14
- //externals: {
15
- //"crypto": "crypto",
16
- //"process/browser.js": "process",
17
- //"module.js": "module"
18
- //},
19
16
externals : [
20
17
function ( context , request , callback ) {
21
- //if (/\/module\.js$/.test(request))
22
- //return callback(null, "var module");
23
- //else if (/browserify|crypto/.test(request)) {
24
18
if ( / b r o w s e r i f y | c r y p t o / . test ( request ) ) {
25
19
return callback ( null , "var {}" ) ;
26
20
} else {
@@ -38,5 +32,11 @@ module.exports = {
38
32
module : {
39
33
loaders : [
40
34
]
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