@@ -90,8 +90,8 @@ export class Project {
90
90
} ,
91
91
buildTarget : mode === 'development' ? 'es2018' : 'es2015' ,
92
92
sourceMap : false ,
93
- reactUrl : 'https://esm.sh/react@16.14.0 ' ,
94
- reactDomUrl : 'https://esm.sh/react-dom@16.14.0 ' ,
93
+ reactUrl : 'https://esm.sh/react@17.0.1 ' ,
94
+ reactDomUrl : 'https://esm.sh/react-dom@17.0.1 ' ,
95
95
plugins : [ ] ,
96
96
postcss : {
97
97
plugins : [
@@ -466,7 +466,7 @@ export class Project {
466
466
Object . assign ( this . importMap , { imports : Object . assign ( { } , this . importMap . imports , imports ) } )
467
467
}
468
468
469
- const { ALEPH_IMPORT_MAP } = globalThis as any
469
+ const { ALEPH_IMPORT_MAP , navigator } = globalThis as any
470
470
if ( ALEPH_IMPORT_MAP ) {
471
471
const { imports } = ALEPH_IMPORT_MAP
472
472
Object . assign ( this . importMap , { imports : Object . assign ( { } , this . importMap . imports , imports ) } )
@@ -525,6 +525,7 @@ export class Project {
525
525
Object . assign ( this . config , { sourceMap } )
526
526
}
527
527
if ( util . isNEString ( defaultLocale ) ) {
528
+ navigator . language = defaultLocale
528
529
Object . assign ( this . config , { defaultLocale } )
529
530
}
530
531
if ( util . isArray ( locales ) ) {
@@ -559,8 +560,6 @@ export class Project {
559
560
log . warn ( 'bad postcss.config.json' , e . message )
560
561
}
561
562
}
562
- // update buildID
563
- Object . assign ( this , { buildID : this . mode + '.' + this . config . buildTarget } )
564
563
// update routing
565
564
this . #routing = new Routing ( [ ] , this . config . baseUrl , this . config . defaultLocale , this . config . locales )
566
565
}
@@ -923,10 +922,10 @@ export class Project {
923
922
break
924
923
}
925
924
}
926
- if ( / ^ h t t p s ? : \/ \/ [ 0 - 9 a - z \. \- ] + \/ r e a c t ( @ [ 0 - 9 a - z \. \- ] + ) ? \/ ? $ / i. test ( dlUrl ) ) {
925
+ if ( / ^ ( h t t p s ? : \/ \/ [ 0 - 9 a - z \. \- ] + ) ? \/ r e a c t ( @ [ 0 - 9 a - z \. \- ] + ) ? \/ ? $ / i. test ( dlUrl ) ) {
927
926
dlUrl = this . config . reactUrl
928
927
}
929
- if ( / ^ h t t p s ? : \/ \/ [ 0 - 9 a - z \. \- ] + \/ r e a c t \- d o m ( @ [ 0 - 9 a - z \. \- ] + ) ? ( \/ s e r v e r ) ? \/ ? $ / i. test ( dlUrl ) ) {
928
+ if ( / ^ ( h t t p s ? : \/ \/ [ 0 - 9 a - z \. \- ] + ) ? \/ r e a c t \- d o m ( @ [ 0 - 9 a - z \. \- ] + ) ? ( \/ s e r v e r ) ? \/ ? $ / i. test ( dlUrl ) ) {
930
929
dlUrl = this . config . reactDomUrl
931
930
if ( / \/ s e r v e r \/ ? $ / i. test ( url ) ) {
932
931
dlUrl += '/server'
@@ -1449,6 +1448,23 @@ export class Project {
1449
1448
Object . assign ( globalThis , {
1450
1449
__createHTMLDocument : ( ) => createHTMLDocument ( ) ,
1451
1450
document : createHTMLDocument ( ) ,
1451
+ navigator : {
1452
+ connection : {
1453
+ downlink : 1.5 ,
1454
+ effectiveType : "3g" ,
1455
+ onchange : null ,
1456
+ rtt : 300 ,
1457
+ saveData : false ,
1458
+ } ,
1459
+ cookieEnabled : false ,
1460
+ deviceMemory : 8 ,
1461
+ hardwareConcurrency : Deno . systemCpuInfo ( ) . cores ,
1462
+ language : 'en' ,
1463
+ maxTouchPoints : 0 ,
1464
+ onLine : true ,
1465
+ userAgent : `Deno/${ Deno . version . deno } ` ,
1466
+ vendor : "Deno Land" ,
1467
+ } ,
1452
1468
location : {
1453
1469
protocol : 'http:' ,
1454
1470
host : 'localhost' ,
0 commit comments