import path from "path"; import grabDirNames from "./grab-dir-names"; /** * # URL path the dist `public` directory is served at * Its path relative to the project root, e.g. `/.bunext/public`. Bundle * paths in the bundler maps are project-relative, so `/${path}` is their * URL. Kept out of `grabDirNames()`: `init` creates every path listed there. */ export default function grabBunextPublicUrlPath() { const { ROOT_DIR, BUNEXT_PUBLIC_DIR } = grabDirNames(); return `/${path .relative(ROOT_DIR, BUNEXT_PUBLIC_DIR) .split(path.sep) .join("/")}`; }