File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5858 var distMatch = selfSrc . match ( / ^ ( .* ?) \/ ? (?: c l a s s i c \/ ) ? i n c l u d e - c l a s s i c \. j s (?: [ ? # ] | $ ) / ) ;
5959 if ( distMatch && distMatch [ 1 ] ) {
6060 disturl = distMatch [ 1 ] ;
61+ //web 与 dist 同级:libsurl 若是相对路径的 web/libs,随 disturl 一起校正
62+ if ( libsurl && ! / ^ h t t p s ? : \/ \/ / i. test ( libsurl ) && / (?: ^ | \/ ) w e b \/ l i b s \/ ? $ / . test ( libsurl ) ) {
63+ libsurl = disturl . replace ( / \/ ? d i s t \/ ? $ / , '' ) + '/web/libs' ;
64+ }
6165 }
6266 var includes = ( targetScript . getAttribute ( 'include' ) || "" ) . split ( "," ) ;
6367 var excludes = ( targetScript . getAttribute ( 'exclude' ) || "" ) . split ( "," ) ;
Original file line number Diff line number Diff line change 5858 var distMatch = selfSrc . match ( / ^ ( .* ?) \/ ? (?: l e a f l e t \/ ) ? i n c l u d e - l e a f l e t \. j s (?: [ ? # ] | $ ) / ) ;
5959 if ( distMatch && distMatch [ 1 ] ) {
6060 disturl = distMatch [ 1 ] ;
61+ //web 与 dist 同级:libsurl 若是相对路径的 web/libs,随 disturl 一起校正
62+ if ( libsurl && ! / ^ h t t p s ? : \/ \/ / i. test ( libsurl ) && / (?: ^ | \/ ) w e b \/ l i b s \/ ? $ / . test ( libsurl ) ) {
63+ libsurl = disturl . replace ( / \/ ? d i s t \/ ? $ / , '' ) + '/web/libs' ;
64+ }
6165 }
6266 var includes = ( targetScript . getAttribute ( 'include' ) || '' ) . split ( ',' ) ;
6367 var excludes = ( targetScript . getAttribute ( 'exclude' ) || '' ) . split ( ',' ) ;
187191 }
188192
189193 load ( {
190- libsurl : 'https://iclient.supermap.io /web/libs' ,
194+ libsurl : '../.. /web/libs' ,
191195 disturl : '../../dist'
192196 } ) ;
193197 window . isLocal = false ;
Original file line number Diff line number Diff line change 5858 var distMatch = selfSrc . match ( / ^ ( .* ?) \/ ? (?: m a p b o x g l \/ ) ? i n c l u d e - m a p b o x g l \. j s (?: [ ? # ] | $ ) / ) ;
5959 if ( distMatch && distMatch [ 1 ] ) {
6060 disturl = distMatch [ 1 ] ;
61+ //web 与 dist 同级:libsurl 若是相对路径的 web/libs,随 disturl 一起校正
62+ if ( libsurl && ! / ^ h t t p s ? : \/ \/ / i. test ( libsurl ) && / (?: ^ | \/ ) w e b \/ l i b s \/ ? $ / . test ( libsurl ) ) {
63+ libsurl = disturl . replace ( / \/ ? d i s t \/ ? $ / , '' ) + '/web/libs' ;
64+ }
6165 }
6266 var includes = ( targetScript . getAttribute ( 'include' ) || '' ) . split ( ',' ) ;
6367 var excludes = ( targetScript . getAttribute ( 'exclude' ) || '' ) . split ( ',' ) ;
Original file line number Diff line number Diff line change 5858 var distMatch = selfSrc . match ( / ^ ( .* ?) \/ ? (?: m a p l i b r e g l \/ ) ? i n c l u d e - m a p l i b r e g l \. j s (?: [ ? # ] | $ ) / ) ;
5959 if ( distMatch && distMatch [ 1 ] ) {
6060 disturl = distMatch [ 1 ] ;
61+ //web 与 dist 同级:libsurl 若是相对路径的 web/libs,随 disturl 一起校正
62+ if ( libsurl && ! / ^ h t t p s ? : \/ \/ / i. test ( libsurl ) && / (?: ^ | \/ ) w e b \/ l i b s \/ ? $ / . test ( libsurl ) ) {
63+ libsurl = disturl . replace ( / \/ ? d i s t \/ ? $ / , '' ) + '/web/libs' ;
64+ }
6165 }
6266 var includes = ( targetScript . getAttribute ( 'include' ) || '' ) . split ( ',' ) ;
6367 var excludes = ( targetScript . getAttribute ( 'exclude' ) || '' ) . split ( ',' ) ;
Original file line number Diff line number Diff line change 5858 var distMatch = selfSrc . match ( / ^ ( .* ?) \/ ? (?: o l \/ ) ? i n c l u d e - o l \. j s (?: [ ? # ] | $ ) / ) ;
5959 if ( distMatch && distMatch [ 1 ] ) {
6060 disturl = distMatch [ 1 ] ;
61+ //web 与 dist 同级:libsurl 若是相对路径的 web/libs,随 disturl 一起校正
62+ if ( libsurl && ! / ^ h t t p s ? : \/ \/ / i. test ( libsurl ) && / (?: ^ | \/ ) w e b \/ l i b s \/ ? $ / . test ( libsurl ) ) {
63+ libsurl = disturl . replace ( / \/ ? d i s t \/ ? $ / , '' ) + '/web/libs' ;
64+ }
6165 }
6266 var includes = ( targetScript . getAttribute ( 'include' ) || '' ) . split ( ',' ) ;
6367 var excludes = ( targetScript . getAttribute ( 'exclude' ) || '' ) . split ( ',' ) ;
Original file line number Diff line number Diff line change 5858 var distMatch = selfSrc . match ( / ^ ( .* ?) \/ ? (?: o p e n l a y e r s \/ ) ? i n c l u d e - o p e n l a y e r s \. j s (?: [ ? # ] | $ ) / ) ;
5959 if ( distMatch && distMatch [ 1 ] ) {
6060 disturl = distMatch [ 1 ] ;
61+ //web 与 dist 同级:libsurl 若是相对路径的 web/libs,随 disturl 一起校正
62+ if ( libsurl && ! / ^ h t t p s ? : \/ \/ / i. test ( libsurl ) && / (?: ^ | \/ ) w e b \/ l i b s \/ ? $ / . test ( libsurl ) ) {
63+ libsurl = disturl . replace ( / \/ ? d i s t \/ ? $ / , '' ) + '/web/libs' ;
64+ }
6165 }
6266 var includes = ( targetScript . getAttribute ( 'include' ) || '' ) . split ( ',' ) ;
6367 var excludes = ( targetScript . getAttribute ( 'exclude' ) || '' ) . split ( ',' ) ;
Original file line number Diff line number Diff line change 7070 //加载类库资源文件
7171 function load ( config ) {
7272 var libsurl = config . libsurl ;
73+ //web 在 examples 上一级:libsurl 若是相对路径的 web/libs,按 basePath 校正
74+ if ( libsurl && ! / ^ h t t p s ? : \/ \/ / i. test ( libsurl ) && / (?: ^ | \/ ) w e b \/ l i b s \/ ? $ / . test ( libsurl ) ) {
75+ libsurl = basePath . replace ( / \/ ? $ / , '/../' ) + 'web/libs' ;
76+ }
77+
7378 var includes = ( targetScript . getAttribute ( 'include' ) || "" ) . split ( "," ) ;
7479 var excludes = ( targetScript . getAttribute ( 'exclude' ) || "" ) . split ( "," ) ;
7580 const resourceLanguage = getLanguage ( ) ;
You can’t perform that action at this time.
0 commit comments