You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using liquidjs in a react app, so it is running in the browser. I need to customize how the paths are interpreted, so I provided an FS object like in the documentation. I also need to change the default root.
The issue is that the root that gets passed to resolve(root, file, ext) is not the one that I'm providing when creating the Liquid instance. I end up with a URL as root. I spent some time debugging this. Take this code for example:
When creating a new Liquid object, the options are first normalized using src/liquid-options.ts: normalize(), which calls normalizeDirectoryList(options.root). This function returns:
However, the fs.resolve() that this function uses is not the fs that I passed in the options. Not only that but it also adds other characters after the root I provided.
I don't understand why that return is the way it is, but it seems to behave in a really unintuitive way.
The text was updated successfully, but these errors were encountered:
I am using liquidjs in a react app, so it is running in the browser. I need to customize how the paths are interpreted, so I provided an FS object like in the documentation. I also need to change the default root.
The issue is that the root that gets passed to
resolve(root, file, ext)
is not the one that I'm providing when creating the Liquid instance. I end up with a URL asroot
. I spent some time debugging this. Take this code for example:When creating a new Liquid object, the options are first normalized using
src/liquid-options.ts: normalize()
, which callsnormalizeDirectoryList(options.root)
. This function returns:However, the
fs.resolve()
that this function uses is not thefs
that I passed in the options. Not only that but it also adds other characters after the root I provided.I don't understand why that return is the way it is, but it seems to behave in a really unintuitive way.
The text was updated successfully, but these errors were encountered: