bugfix relative path + build

This commit is contained in:
Leon van Kammen 2023-12-06 18:02:59 +01:00
parent 9ef32ac2a3
commit f9af5029e3
7 changed files with 2246 additions and 10 deletions

View file

@ -972,8 +972,8 @@ xrf.navigator.to = (url,flags,loader,data) => {
loader = loader || new Loader().setPath( dir ) loader = loader || new Loader().setPath( dir )
} }
// force relative path // force relative path for files which dont include protocol or relative path
if( dir ) dir = dir[0] == '.' ? dir : `.${dir}` if( dir ) dir = dir[0] == '.' || dir.match("://") ? dir : `.${dir}`
url = url.replace(dir,"") url = url.replace(dir,"")
loader = loader || new Loader().setPath( dir ) loader = loader || new Loader().setPath( dir )
const onLoad = (model) => { const onLoad = (model) => {

View file

@ -971,8 +971,8 @@ xrf.navigator.to = (url,flags,loader,data) => {
loader = loader || new Loader().setPath( dir ) loader = loader || new Loader().setPath( dir )
} }
// force relative path // force relative path for files which dont include protocol or relative path
if( dir ) dir = dir[0] == '.' ? dir : `.${dir}` if( dir ) dir = dir[0] == '.' || dir.match("://") ? dir : `.${dir}`
url = url.replace(dir,"") url = url.replace(dir,"")
loader = loader || new Loader().setPath( dir ) loader = loader || new Loader().setPath( dir )
const onLoad = (model) => { const onLoad = (model) => {

View file

@ -83,3 +83,23 @@
* https://xrfragment.org * https://xrfragment.org
* SPDX-License-Identifier: MPL-2.0 * SPDX-License-Identifier: MPL-2.0
*/ */
/*
* generated at $(date)
* https://xrfragment.org
* SPDX-License-Identifier: MPL-2.0
*/
/*
* generated at $(date)
* https://xrfragment.org
* SPDX-License-Identifier: MPL-2.0
*/
/*
* generated at $(date)
* https://xrfragment.org
* SPDX-License-Identifier: MPL-2.0
*/
/*
* generated at $(date)
* https://xrfragment.org
* SPDX-License-Identifier: MPL-2.0
*/

File diff suppressed because it is too large Load diff

View file

@ -971,8 +971,8 @@ xrf.navigator.to = (url,flags,loader,data) => {
loader = loader || new Loader().setPath( dir ) loader = loader || new Loader().setPath( dir )
} }
// force relative path // force relative path for files which dont include protocol or relative path
if( dir ) dir = dir[0] == '.' ? dir : `.${dir}` if( dir ) dir = dir[0] == '.' || dir.match("://") ? dir : `.${dir}`
url = url.replace(dir,"") url = url.replace(dir,"")
loader = loader || new Loader().setPath( dir ) loader = loader || new Loader().setPath( dir )
const onLoad = (model) => { const onLoad = (model) => {

View file

@ -971,8 +971,8 @@ xrf.navigator.to = (url,flags,loader,data) => {
loader = loader || new Loader().setPath( dir ) loader = loader || new Loader().setPath( dir )
} }
// force relative path // force relative path for files which dont include protocol or relative path
if( dir ) dir = dir[0] == '.' ? dir : `.${dir}` if( dir ) dir = dir[0] == '.' || dir.match("://") ? dir : `.${dir}`
url = url.replace(dir,"") url = url.replace(dir,"")
loader = loader || new Loader().setPath( dir ) loader = loader || new Loader().setPath( dir )
const onLoad = (model) => { const onLoad = (model) => {

View file

@ -21,8 +21,8 @@ xrf.navigator.to = (url,flags,loader,data) => {
loader = loader || new Loader().setPath( dir ) loader = loader || new Loader().setPath( dir )
} }
// force relative path // force relative path for files which dont include protocol or relative path
if( dir ) dir = dir[0] == '.' ? dir : `.${dir}` if( dir ) dir = dir[0] == '.' || dir.match("://") ? dir : `.${dir}`
url = url.replace(dir,"") url = url.replace(dir,"")
loader = loader || new Loader().setPath( dir ) loader = loader || new Loader().setPath( dir )
const onLoad = (model) => { const onLoad = (model) => {