Skip to content

Commit

Permalink
Try to do ES modules properly
Browse files Browse the repository at this point in the history
  • Loading branch information
jcreedcmu committed Mar 31, 2024
1 parent 0a2b0f3 commit 779bb10
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const esbuild = require('esbuild');
import * as esbuild from 'esbuild';

async function go() {
const args = process.argv.slice(2);
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "twelf-wasm",
"type": "module",
"exports": {
"require": "./lib/encoding.cjs",
"import": "./lib/encoding.mjs"
"import": "./lib/encoding.js"
},
"types": "lib/encoding.d.ts",
"version": "0.1.7",
Expand All @@ -25,7 +26,7 @@
"scripts": {
"test": "jest",
"test-watch": "jest --watch",
"build-lib": "tsc --project tsconfig.lib.json && mv ./lib/encoding.js ./lib/encoding.mjs && node build-lib.js"
"build-lib": "tsc --project tsconfig.lib.json && node build-lib.js"
},
"devDependencies": {
"@codemirror/language": "^6.10.1",
Expand All @@ -42,7 +43,7 @@
"files": [
"package.json",
"README.md",
"lib/encoding.mjs",
"lib/encoding.js",
"lib/encoding.cjs",
"lib/encoding.cjs.map",
"lib/encoding.d.ts"
Expand Down

0 comments on commit 779bb10

Please # to comment.