Skip to content

Commit

Permalink
fix: Esm exports
Browse files Browse the repository at this point in the history
- add exports property
- add type=module to lib-esm
  • Loading branch information
vio committed Aug 19, 2024
1 parent a34760f commit a42f6dd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/plugin-webpack-filter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
"module": "lib-esm/index.js",
"types": "types/index.d.ts",
"sideEffects": false,
"exports": {
".": {
"import": "./lib-esm/index.js",
"require": "./lib/index.js",
"types": "./types/index.d.ts"
}
},
"engines": {
"node": ">= 14.0"
},
Expand All @@ -15,7 +22,7 @@
"scripts": {
"build": "npm run clean && npm run build-lib && npm run build-esm",
"build-lib": "npm run clean-lib && tsc --rootDir ./src --project tsconfig.lib.json --outDir ./lib",
"build-esm": "npm run clean-esm && tsc --rootDir ./src --project tsconfig.esm.json --outDir ./lib-esm",
"build-esm": "npm run clean-esm && tsc --rootDir ./src --project tsconfig.esm.json --outDir ./lib-esm && echo '{\"type\":\"module\"}' > lib-esm/package.json",
"clean": "npm run clean-lib && npm run clean-esm",
"clean-lib": "rimraf lib",
"clean-esm": "rimraf lib-esm types",
Expand Down

0 comments on commit a42f6dd

Please sign in to comment.