http-api: updating dist to be more compatible with node

This commit is contained in:
Hunter Miller 2022-04-20 10:00:46 -05:00
parent 25988742f2
commit 3e38e6c4f7
2 changed files with 7 additions and 3 deletions

View File

@ -9,8 +9,12 @@
"directory": "pkg/npm/http-api" "directory": "pkg/npm/http-api"
}, },
"type": "module", "type": "module",
"main": "dist/cjs/index.js", "main": "dist/cjs/index.cjs",
"module": "dist/esm/index.js", "module": "dist/esm/index.js",
"exports": {
"require": "./dist/cjs/index.cjs",
"import": "./dist/esm/index.js"
},
"jsdelivr": "dist/urbit-http-api.min.js", "jsdelivr": "dist/urbit-http-api.min.js",
"unpkg": "dist/urbit-http-api.min.js", "unpkg": "dist/urbit-http-api.min.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",

View File

@ -56,13 +56,13 @@ export default [
], ],
output: [ output: [
{ {
dir: 'dist/esm', file: 'dist/esm/index.js',
format: 'esm', format: 'esm',
exports: 'named', exports: 'named',
sourcemap: true, sourcemap: true,
}, },
{ {
dir: 'dist/cjs', file: 'dist/cjs/index.cjs',
format: 'cjs', format: 'cjs',
exports: 'named', exports: 'named',
sourcemap: true, sourcemap: true,