Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dependency to vite-plugin-top-level-await. #9

Merged
merged 1 commit into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
258 changes: 0 additions & 258 deletions ts-lib/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion ts-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
"typescript": "^5.2.2",
"vite": "^5.0.0",
"vite-plugin-dts": "^3.6.2",
"vite-plugin-top-level-await": "^1.3.1",
"vitest": "^1.4.0",
"webdriverio": "^8.20.4"
}
Expand Down
6 changes: 3 additions & 3 deletions ts-lib/src/smol-string-worker.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Worker from "./worker.js?worker";

const worker = new Worker();
const worker = new Worker(new URL("./worker.ts", import.meta.url), {
type: "module",
});

let nextID = 0;
const resolver: Record<number, (str: string) => void> = {};
Expand Down
12 changes: 0 additions & 12 deletions ts-lib/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import { defineConfig } from "vite";
import dts from "vite-plugin-dts";
import pkg from "./package.json" assert { type: "json" };

import topLevelAwait from "vite-plugin-top-level-await";

export default defineConfig({
base: "./",
build: {
Expand All @@ -25,16 +23,6 @@ export default defineConfig({
},
worker: {
format: "es",
plugins() {
return [
topLevelAwait({
// The export name of top-level await promise for each chunk module
promiseExportName: "__tla",
// The function to generate import names of top-level await promise in each chunk module
promiseImportName: (i) => `__tla_${i}`,
}),
];
},
},
plugins: [
dts(), // emit TS declaration files
Expand Down
Loading