From aad44f208392924236b90b226fb1a5442e794955 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 3 Oct 2023 11:09:34 +0900 Subject: [PATCH] I think specifying .ts works. --- lib/playback/context.ts | 2 +- lib/playback/port.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/playback/context.ts b/lib/playback/context.ts index a8b96ae..a6ef0a9 100644 --- a/lib/playback/context.ts +++ b/lib/playback/context.ts @@ -16,7 +16,7 @@ export class Context { private async load(config: Message.ConfigAudio): Promise { // Load the worklet source code. - const url = new URL("./worklet/index", import.meta.url) + const url = new URL("./worklet/index.ts", import.meta.url) await this.context.audioWorklet.addModule(url) const volume = this.context.createGain() diff --git a/lib/playback/port.ts b/lib/playback/port.ts index e70eb78..46a2c64 100644 --- a/lib/playback/port.ts +++ b/lib/playback/port.ts @@ -10,7 +10,7 @@ export class Port { #callback: Callback constructor(callback: Callback) { - const url = new URL("worker/index", import.meta.url) + const url = new URL("worker/index.ts", import.meta.url) this.#callback = callback