mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Add 2 fragile hacks to make Jumble compile
This commit is contained in:
1 file changed
+13
@@ -227,6 +227,11 @@ export function esmPlugin(packageLock: PackageLock, target?: string): Plugin {
|
||||
|
||||
// Handle bare imports like "react"
|
||||
build.onResolve({ filter: /^[^./].*/ }, (args) => {
|
||||
// HACK: https://github.com/esm-dev/esm.sh/issues/1217
|
||||
if (args.path === "yet-another-react-lightbox/styles.css") {
|
||||
args.path = "yet-another-react-lightbox/dist/styles.css";
|
||||
}
|
||||
|
||||
const packageName = args.path.startsWith("@")
|
||||
? args.path.split("/").slice(0, 2).join("/")
|
||||
: args.path.split("/")[0];
|
||||
@@ -303,6 +308,14 @@ export function esmPlugin(packageLock: PackageLock, target?: string): Plugin {
|
||||
const urlStr = url.toString();
|
||||
setUrlLockPath(urlStr, childLockPath);
|
||||
|
||||
// HACK: https://github.com/esm-dev/esm.sh/issues/1218
|
||||
if (specifier === "@lightninglabs/[email protected]") {
|
||||
return {
|
||||
path: urlStr,
|
||||
external: true,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
path: urlStr,
|
||||
namespace: "esm",
|
||||
|
||||
Reference in new issue
Block a user