feat: scaffold Astro + Tailwind project

This commit is contained in:
TerryM
2026-05-12 16:16:03 +08:00
parent 906eb5c763
commit 03d3800c6c
12097 changed files with 1266600 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import { createRequire } from "node:module";
import path from "node:path";
import { pathToFileURL } from "node:url";
let cwdUrlStr;
const require2 = createRequire(import.meta.url);
async function importPlugin(p) {
try {
const importResult2 = await import(
/* @vite-ignore */
p
);
return importResult2.default;
} catch {
}
cwdUrlStr ??= pathToFileURL(path.join(process.cwd(), "package.json")).toString();
const resolved = pathToFileURL(require2.resolve(p, { paths: [cwdUrlStr] })).toString();
const importResult = await import(
/* @vite-ignore */
resolved
);
return importResult.default;
}
export {
importPlugin
};