1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2026-06-13 19:55:26 -04:00

remove dependency on uglify-js

This commit is contained in:
2024-02-26 10:49:14 -05:00
parent ace50ff2c9
commit 955cfe421f
19 changed files with 239 additions and 418 deletions
+4 -1
View File
@@ -43,7 +43,10 @@ const Link = ({ href, rel, target, prefetch = false, underline = true, openInNew
// links) or a new tab (the default for external links). Defaults can be overridden with `openInNewTab={true}`.
const isExternal =
typeof href === "string" &&
!(href[0] === "/" || href[0] === "#" || (process.env.BASE_URL && href.startsWith(process.env.BASE_URL)));
!(
["/", "#"].includes(href[0]) ||
(process.env.NEXT_PUBLIC_BASE_URL && href.startsWith(process.env.NEXT_PUBLIC_BASE_URL))
);
if (openInNewTab || isExternal) {
return (