mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 08:37:22 +00:00
Fix CSS relative imports
This commit is contained in:
1 file changed
+4
@@ -80,6 +80,10 @@ export function esmPlugin(packageLock: PackageLock, target?: string): Plugin {
|
|||||||
const keys: string[] = [];
|
const keys: string[] = [];
|
||||||
let importerPackage: string | undefined;
|
let importerPackage: string | undefined;
|
||||||
try {
|
try {
|
||||||
|
const { pathname } = new URL(args.importer);
|
||||||
|
if (/\.css$/.test(pathname)) {
|
||||||
|
return; // CSS imports don't have external dependencies
|
||||||
|
}
|
||||||
importerPackage = extractPackageName(args.importer);
|
importerPackage = extractPackageName(args.importer);
|
||||||
keys.push(
|
keys.push(
|
||||||
`node_modules/${importerPackage}/node_modules/${packageName}`,
|
`node_modules/${importerPackage}/node_modules/${packageName}`,
|
||||||
|
|||||||
Reference in new issue
Block a user