cosmology-tech / telescope

A TypeScript Transpiler for Cosmos Protobufs ⚛️
https://cosmology.zone/products/telescope
Apache License 2.0
141 stars 41 forks source link

Esm compatibility #590

Closed Zetazzz closed 4 months ago

Zetazzz commented 4 months ago

use restoreImportExtension in options to add ext to paths. e.g.:

restoreImportExtension: '.js'

import { Attribute, AttributeSDKType } from "../../base/v1beta2/attribute.js";

or

restoreImportExtension: '.mjs'

import { Attribute, AttributeSDKType } from "../../base/v1beta2/attribute.mjs";

All related paths have been handled.