UNPKG

nitropage

Version:

A free and open source, extensible visual page builder based on SolidStart.

12 lines (10 loc) 465 B
import { join, resolve } from "path"; import { fileURLToPath } from "url"; import { env } from "./util/env"; const devPublicPath = join(process.cwd(), "public"); const dirname = fileURLToPath(new URL(".", import.meta?.url)); const outputDir = dirname.slice(0, dirname.lastIndexOf("/server/")); export const publicPath = import.meta.env?.PROD ? resolve(outputDir, "public") : devPublicPath; export const runtimePath = env("NP_RUNTIME_PATH") ?? "./src/runtime";