UNPKG

mytril

Version:

Mytril Svelte library component for rapidly building modern websites based on Svelte and Sveltekit

17 lines (16 loc) 431 B
import path from 'path'; const directory = process.cwd(); const config = { params: undefined }; export async function mytrilImporter() { try { const fullPath = path.resolve(path.resolve(path.resolve(`${directory}`), `mytril.config.js`)); const content = await import(fullPath); config.params = content.default || config; } catch (err) { console.warn(err); } return config; }