diff --git a/tasks/compile-api.js b/tasks/compile-api.js index 53b158d..4d0dafb 100644 --- a/tasks/compile-api.js +++ b/tasks/compile-api.js @@ -1,7 +1,7 @@ import { build } from 'esbuild'; import fs from 'fs-extra'; -import pjson from '../package.json'; -import types from '../src/types'; +import pjson from '../package.json' assert { type: 'json' }; +import * as types from '../types.js'; async function api() { await fs.remove('deadname-remover.require.js'); diff --git a/tasks/generate-types.js b/tasks/generate-types.js index c6480b6..97b7851 100644 --- a/tasks/generate-types.js +++ b/tasks/generate-types.js @@ -4,7 +4,7 @@ async function generateType() { await build({ entryPoints: ['src/types.ts'], outfile: 'types.js', - format: 'cjs', + format: 'esm', sourcemap: false, minify: false, bundle: false,