Skip to content

Commit

Permalink
chore: Disable publishing sourcemaps
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Gerrit0 committed Feb 23, 2021
1 parent 4fa3b06 commit adfa846
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion package.json
Expand Up @@ -58,6 +58,7 @@
"files": [
"bin",
"dist",
"!*.map",
"!dist/test",
"tasks",
"LICENSE"
Expand All @@ -68,9 +69,10 @@
"prerebuild_specs": "npm run pretest",
"rebuild_specs": "node scripts/rebuild_specs.js",
"build": "tsc --project .",
"build:prod": "tsc --project . --sourceMap false",
"build_and_test": "npm run build && npm run test",
"lint": "eslint . && prettier --check .",
"prepublishOnly": "node scripts/set_strict.js false && npm run lint && npm run build_and_test",
"prepublishOnly": "node scripts/set_strict.js false && npm run lint && npm run build:prod && npm test",
"postpublish": "node scripts/set_strict.js true",
"clean": "rm -rf node_modules package-lock.json lib coverage"
},
Expand Down
2 changes: 1 addition & 1 deletion src/lib/utils/index.ts
Expand Up @@ -4,7 +4,7 @@
* script will be used to switch this flag to false when publishing, then immediately back
* to true after a successful publish.
*/
type InternalOnly = true;
type InternalOnly = false;

/**
* Helper type to convert `T` to `F` if strict mode is on.
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Expand Up @@ -20,7 +20,6 @@
"preserveConstEnums": true,
"declaration": true,
"sourceMap": true,
"inlineSources": true, // Required for debugging NPM published package.

// Output
"outDir": "dist/",
Expand Down

0 comments on commit adfa846

Please sign in to comment.