defineComponents passes the glob path directly to fast-glob which expects normalized unixy pathsetInputPath accepts windows paths just fine (it normalizes internally)
Both seem to be accepting paths which are relative to the current working directory and not relative to the script file where WebC().functionName() is being invoked. Not sure what the standards are in the JS ecosystem regarding this. I am writing code like the following to get my code to work.
// src/server/page-renderer-webc.js
import * as url from 'url'
const __dirname = url.fileURLToPath(new URL('.', import.meta.url));
let pageInputPath = path.resolve(__dirname, 'page.webc') // = "full/path/to/src/server/page.webc"
let webC = new WebC({file: pageInputPath})
defineComponents
passes the glob path directly tofast-glob
which expects normalized unixy pathsetInputPath
accepts windows paths just fine (it normalizes internally)Both seem to be accepting paths which are relative to the current working directory and not relative to the script file where
WebC().functionName()
is being invoked. Not sure what the standards are in the JS ecosystem regarding this. I am writing code like the following to get my code to work.Is this normal?