mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Externalize static assets like fonts
This commit is contained in:
1 file changed
+8
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user