Skip to content

Commit adfa846

Browse files
committed
chore: Disable publishing sourcemaps
They are unnecessarily inflating the bundle size, and I never debug from a published bundle in the first place, so they aren't that useful.
1 parent 4fa3b06 commit adfa846

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"files": [
5959
"bin",
6060
"dist",
61+
"!*.map",
6162
"!dist/test",
6263
"tasks",
6364
"LICENSE"
@@ -68,9 +69,10 @@
6869
"prerebuild_specs": "npm run pretest",
6970
"rebuild_specs": "node scripts/rebuild_specs.js",
7071
"build": "tsc --project .",
72+
"build:prod": "tsc --project . --sourceMap false",
7173
"build_and_test": "npm run build && npm run test",
7274
"lint": "eslint . && prettier --check .",
73-
"prepublishOnly": "node scripts/set_strict.js false && npm run lint && npm run build_and_test",
75+
"prepublishOnly": "node scripts/set_strict.js false && npm run lint && npm run build:prod && npm test",
7476
"postpublish": "node scripts/set_strict.js true",
7577
"clean": "rm -rf node_modules package-lock.json lib coverage"
7678
},

src/lib/utils/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* script will be used to switch this flag to false when publishing, then immediately back
55
* to true after a successful publish.
66
*/
7-
type InternalOnly = true;
7+
type InternalOnly = false;
88

99
/**
1010
* Helper type to convert `T` to `F` if strict mode is on.

tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"preserveConstEnums": true,
2121
"declaration": true,
2222
"sourceMap": true,
23-
"inlineSources": true, // Required for debugging NPM published package.
2423

2524
// Output
2625
"outDir": "dist/",

0 commit comments

Comments
 (0)