UNPKG

@magic/core

Version:

@magic core. generate static pages and serverless lambdas. ~5kb client boilerplate.

15 lines (12 loc) 244 B
import path from 'node:path' import { pathToFileURL } from 'node:url' export const saveImport = async p => { try { if (path.isAbsolute(p)) { p = pathToFileURL(p) } return await import(p) } catch (e) { return e } }