File tree Expand file tree Collapse file tree
packages/taro-platform-alipay/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,11 +81,11 @@ function modifyPageTemplate (ctx: IPluginContext) {
8181 const assetsItem = assets [ templateName ]
8282 const src = assetsItem . _value ? assetsItem . _value . toString ( ) : assetsItem . source ( )
8383 let relativePath
84- const templateCaller = src . replace ( / < i m p o r t s r c = " ( .* ) b a s e \. a x m l " \/ > / , function ( _ , $1 ) {
84+ const templateCaller = src . replace ( / < i m p o r t s r c = " ( .* ) b a s e \. a x m l " \s * \ /> / , function ( _ , $1 ) {
8585 relativePath = $1
8686 return ''
8787 } )
88- const main = baseXml . replace ( / < i m p o r t - s j s n a m e = " x s " f r o m = " ( .* ) u t i l s .s j s " \/ > / , function ( ) {
88+ const main = baseXml . replace ( / < i m p o r t - s j s n a m e = " x s " f r o m = " ( .* ) u t i l s .s j s " \s * \/ > / , function ( ) {
8989 return src . includes ( '<import-sjs name="xs"' )
9090 ? ''
9191 : `<import-sjs name="xs" from="${ relativePath } utils.sjs" />`
You can’t perform that action at this time.
0 commit comments