Skip to content

Commit

Permalink
made node-logger CJS only, prebundle everything, treeshake CJS output…
Browse files Browse the repository at this point in the history
… as well
  • Loading branch information
ndelangen committed Jun 16, 2023
1 parent 92885b3 commit 2ac6689
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 7 additions & 8 deletions code/lib/node-logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@
".": {
"types": "./dist/index.d.ts",
"node": "./dist/index.js",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"require": "./dist/index.js"
},
"./package.json": "./package.json"
},
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist/**/*",
Expand All @@ -42,14 +40,12 @@
"check": "../../../scripts/node_modules/.bin/tsc --noEmit",
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"devDependencies": {
"@types/npmlog": "^4.1.2",
"@types/pretty-hrtime": "^1.0.0",
"chalk": "^4.1.0",
"npmlog": "^5.0.1",
"pretty-hrtime": "^1.0.3"
},
"devDependencies": {
"@types/pretty-hrtime": "^1.0.0",
"pretty-hrtime": "^1.0.3",
"typescript": "~4.9.3"
},
"publishConfig": {
Expand All @@ -58,6 +54,9 @@
"bundler": {
"entries": [
"./src/index.ts"
],
"formats": [
"cjs"
]
},
"gitHead": "e6a7fd8a655c69780bc20b9749c2699e44beae16"
Expand Down
2 changes: 2 additions & 0 deletions scripts/prepare/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => {
tasks.push(
build({
silent: true,
treeshake: true,
splitting: true,
entry: allEntries,
watch,
outDir,
Expand Down

0 comments on commit 2ac6689

Please sign in to comment.