fix bundle duplication

This commit is contained in:
velzie 2024-08-02 17:14:56 -04:00
parent 3826197093
commit 929dfcca24
No known key found for this signature in database
GPG key ID: 048413F95F0DDE1F
8 changed files with 7 additions and 26 deletions

View file

@ -1,4 +1,4 @@
import { encodeUrl } from "../../shared/rewriters/url";
import { encodeUrl } from "../shared";
import { ScramjetClient } from "../client";
export default function (client: ScramjetClient) {

View file

@ -1,4 +1,4 @@
import { encodeUrl } from "../../shared/rewriters/url";
import { encodeUrl } from "../shared";
import { ScramjetClient } from "../client";
// we need a late order because we're mangling with addEventListener at a higher level

View file

@ -1,6 +1,5 @@
import { rewriteJs } from "../../shared/rewriters/js";
import { ScramjetClient } from "../client";
import { config } from "../shared";
import { config, rewriteJs } from "../shared";
export default function (client: ScramjetClient, self: Self) {
// used for proxying *direct eval*

View file

@ -1,4 +1,4 @@
import { encodeUrl } from "../../shared/rewriters/url";
import { encodeUrl } from "../shared";
import { ScramjetClient } from "../client";
export default function (client: ScramjetClient, self: typeof globalThis) {

View file

@ -1,4 +1,4 @@
import { encodeUrl } from "../shared/rewriters/url";
import { encodeUrl } from "./shared";
class ScramjetServiceWorkerRuntime {
constructor() {

View file

@ -1,4 +1,4 @@
import { encodeUrl } from "../shared/rewriters/url";
import { encodeUrl } from "./shared";
import { ScramjetClient } from "./client";
import { indirectEval } from "./shared/eval";
import { config } from "./shared";

View file

@ -1,4 +1,4 @@
import { encodeUrl } from "../../shared/rewriters/url";
import { encodeUrl } from "../shared";
export default function (client, self) {
client.Proxy("importScripts", {

View file

@ -1,18 +0,0 @@
// if (!self.$scramjet) {
// //@ts-expect-error really dumb workaround
// self.$scramjet = {};
// }
// self.$scramjet.config = {
// prefix: "/scramjet/",
// codec: self.$scramjet.codecs.plain,
// wrapfn: "$scramjet$wrap",
// trysetfn: "$scramjet$tryset",
// importfn: "$scramjet$import",
// rewritefn: "$scramjet$rewrite",
// config: "/scram/scramjet.config.js",
// shared: "/scram/scramjet.shared.js",
// worker: "/scram/scramjet.worker.js",
// thread: "/scram/scramjet.thread.js",
// client: "/scram/scramjet.client.js",
// codecs: "/scram/scramjet.codecs.js",
// };