feat! remove esm package folder

This commit is contained in:
Franck Royer 2022-07-26 15:18:03 +10:00 committed by fryorcraken.eth
parent 785a220dff
commit 94a21bc75e
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
3 changed files with 8 additions and 8 deletions

View File

@ -1,7 +1,7 @@
import path from "path";
import fs from "fs";
const START_PATH = path.join(process.cwd(), "dist/esm");
const START_PATH = path.join(process.cwd(), "dist/");
const IMPORT_REGEXP =
/^((import|export) [^';]* from "(\.[^@";]*\/[^";]*)[^";]*)"/g;
const JUST_ADD_AN_EXTENSION = '$1.js"';

View File

@ -2,12 +2,12 @@
"name": "js-waku",
"version": "0.24.0",
"description": "TypeScript implementation of the Waku v2 protocol",
"types": "./dist/esm/index.d.ts",
"module": "./dist/esm/index.js",
"types": "./dist/index.d.ts",
"module": "./dist/index.js",
"exports": {
".": {
"types": "./dist/esm/index.d.ts",
"import": "./dist/esm/index.js"
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
}
},
"type": "module",
@ -25,7 +25,7 @@
"prepare": "husky install",
"build": "rimraf ./dist; run-s build:**",
"build:esm": "tsc && node build-scripts/fix-imports.js",
"build:bundle": "rollup --config rollup.config.js -- dist/esm/index.js",
"build:bundle": "rollup --config rollup.config.js -- dist/index.js",
"build:bundle:min": "terser --ecma 11 --compress --mangle -o dist/bundle.min.js -- dist/bundle.js && gzip -9 -c dist/bundle.min.js > dist/bundle.min.js.gz",
"size": "npm run build && size-limit",
"fix": "run-s fix:*",
@ -152,7 +152,7 @@
"webpack-cli": "^4.10.0"
},
"files": [
"dist/esm",
"dist",
"src/*.ts",
"src/lib/**/*.ts",
"src/proto/**/*.ts",

View File

@ -2,7 +2,7 @@
"compilerOptions": {
"incremental": true,
"target": "es2020",
"outDir": "dist/esm",
"outDir": "dist/",
"rootDir": "src",
"moduleResolution": "node",
"module": "es2020",