From 1b59c3f47a53b054d02c0d8083405ca63ae91d8a Mon Sep 17 00:00:00 2001 From: ergunsh Date: Wed, 9 Jun 2021 18:11:30 +0200 Subject: [PATCH] Keep `js` extension while importing module & types --- libsquoosh/src/codecs.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libsquoosh/src/codecs.ts b/libsquoosh/src/codecs.ts index 57c6665d..e9619fbe 100644 --- a/libsquoosh/src/codecs.ts +++ b/libsquoosh/src/codecs.ts @@ -25,12 +25,12 @@ interface ResizeInstantiateOptions { declare global { // Needed for being able to use ImageData as type in codec types - type ImageData = typeof import('./image_data'); + type ImageData = typeof import('./image_data.js'); // Needed for being able to assign to `globalThis.ImageData` var ImageData: ImageData['constructor']; } -import type { QuantizerModule } from '../../codecs/imagequant/imagequant'; +import type { QuantizerModule } from '../../codecs/imagequant/imagequant.js'; // MozJPEG import mozEnc from '../../codecs/mozjpeg/enc/mozjpeg_node_enc.js'; @@ -94,7 +94,7 @@ const imageQuantPromise: Promise = instantiateEmscriptenWasm( ); // Our decoders currently rely on a `ImageData` global. -import ImageData from './image_data'; +import ImageData from './image_data.js'; globalThis.ImageData = ImageData; function resizeNameToIndex(name: string) {