Relative path doesn't binding well from JS to UX (v0.37.0)

  • fuse version 0.37.0

  • macOS 10.12.5

  • I’ve updated v0.36.1 to v0.37.0, then it seems the string of a relative path binding from JS to UX doesn’t work well.

  • It works well in v0.36.1 .

  • /Assets/avatar.png

  • /Pages/JSFile.js

  • /Pages/UXFile.ux

JS file

...
var image = "../Assets/avatar.png";
module.exports = {
    image: image,
    ...
}

UX file

...
<Image Width="50" Height="50" File="{image}" />
...

error msg

...
[Viewport]: InternalError: ImageSource error: 'BundleFileImageSource-failed-conversion': 
Could not find a part of the path "/Assets/avatar.png". in Fuse.Resources.FileImageSourceImpl
</Users/hhh/Library/Application Support/Fusetools/Packages/Fuse.Elements/1.0.0/resources/$.uno:616>

but if I do fix the UX file like this, it works well.

<Image Width="50" Height="50" File="../Assets/avatar.png" />

Hi fanyhong,

Did you try bundling the img file?

Hi, snehadeep.bhowmick

You mean I have to add my files of the Asset folder to the .unoproj as a bundle?
After I add them as a bundle, then it works well now.
I thought it worked on the previous version, so I was mistaken as a bug.
I’m sorry to get confused.

Thanks, snehadeep.bhowmick.