fix: errors in plugin fixture + improve island docs (#2109)

This commit is contained in:
Marvin Hagemeister
2023-12-01 12:21:10 +01:00
committed by GitHub
parent 054ffbb44a
commit bd372b9535
4 changed files with 30 additions and 11 deletions
+5 -5
View File
@@ -257,13 +257,13 @@ export async function extractRoutes(
for (const plugin of config.plugins || []) {
if (!plugin.islands) continue;
const base = dirname(plugin.islands.baseLocation);
for (const name of plugin.islands.paths) {
const full = join(base, name);
for (const specifier of plugin.islands.paths) {
const full = join(base, specifier);
const module = await import(full);
const fileNameWithExt = basename(full);
const fileName = fileNameWithExt.replace(extname(fileNameWithExt), "");
const name = sanitizeIslandName(basename(full, extname(full)));
processedIslands.push({
name: sanitizeIslandName(fileName),
name,
path: full,
module,
});