Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dumbmatter committed Jan 31, 2025
1 parent 006bb63 commit 732b4ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
5 changes: 1 addition & 4 deletions tools/watch/watchCss.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import path from "node:path";
import { Worker } from "node:worker_threads";

// This import is needed for https://github.com/parcel-bundler/lightningcss/issues/892
Expand All @@ -9,9 +8,7 @@ export const watchCss = async (
updateEnd: (filename: string) => void,
updateError: (filename: string, error: Error) => void,
) => {
const worker = new Worker(
path.join(import.meta.dirname, "watchCssWorker.ts"),
);
const worker = new Worker(new URL("watchCssWorker.ts", import.meta.url));

worker.on("message", (message) => {
if (message.type === "start") {
Expand Down
12 changes: 4 additions & 8 deletions tools/watch/watchJs.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import path from "node:path";
import { Worker } from "node:worker_threads";

export const watchJs = (
Expand All @@ -9,14 +8,11 @@ export const watchJs = (
for (const name of ["ui", "worker"]) {
const filename = `build/gen/${name}.js`;

const worker = new Worker(
path.join(import.meta.dirname, "watchJsWorker.ts"),
{
workerData: {
name,
},
const worker = new Worker(new URL("watchJsWorker.ts", import.meta.url), {
workerData: {
name,
},
);
});

worker.on("message", (message) => {
if (message.type === "start") {
Expand Down

0 comments on commit 732b4ba

Please sign in to comment.