Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
rollupOptions.input.includes(source)
) {
return null;
}
const { rootDir = process.cwd() } = localPluginConfig;
const basePath = importer ? importer.replace(rootDir, `${rootDir}::`) : `${rootDir}::`;
if (importMapCache === null) {
inlineImportMaps.forEach(importMapString => {
const newImportMap = parseFromString(importMapString, basePath);
importMapCache = mergeImportMaps(importMapCache, newImportMap);
});
}
const relativeSource = source.replace(rootDir, '');
const resolvedPath = resolve(relativeSource, importMapCache, basePath);
if (resolvedPath) {
return resolvedPath;
}
}
return null;
},