UNPKG

ap-ssg

Version:

A fast, modular, SEO-optimized static site generator that minifies CSS, JS, and HTML for improved performance. It also supports JSON-LD, sitemap generation, and more, making it ideal for production-ready websites.

13 lines (11 loc) 375 B
const path = require("path"); /** * A custom function that resolve paths to current working directory's src/pages folder * @param {string} module * @param {string} basePath * @returns {*|null} */ module.exports = (module, basePath = "src/pages") => require(module.startsWith(".") ? path.resolve(process.cwd(), basePath, module) : module) || null;