Externalize static assets like fonts

This commit is contained in:
Alex Gleason committed 2025-09-27 21:23:45 -05:00
1 parent 939deabb5b
commit 8c60a3a8bc
1 file changed
+8
+8
View File
@@ -131,6 +131,14 @@ export function esmPlugin(packageLock: PackageLock, target?: string): Plugin {
}
}
// Skip static assets
if (/\.(woff2?|ttf|otf|eot)$/.test(fullURL.pathname)) {
return {
path: fullURL.toString(),
external: true,
};
}
return {
path: fullURL.toString(),
namespace: "esm",