I have created a js file for storing constants inside assets/Model/constants.js I had a view inside assets/homeview.qml. This homeview.qml imports
import "Model/constants.js" as Global
and I could access Global.myConstant
with no error.
Now I moved the homeview.qml inside a folder. assets/Views/homeview.qml and changed the import location to
import "/Model/constants.js" as Global
but now Global.myConstant
shows unknown variable myConstant error. Is there something else I need to do when I move file inside a folder?