Skip to content

Commit

Permalink
refactor: reduce build size (#441)
Browse files Browse the repository at this point in the history
* refactor: reduce build size

* chore: resolve tsc
  • Loading branch information
wellwelwel authored Jun 22, 2024
1 parent 23d0b92 commit 08290f0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"docker:deno": "docker compose -f ./test/docker/playground/deno/docker-compose.yml up --build",
"clear": "shx rm -rf ./lib ./ci ./coverage",
"prebuild": "npm run clear",
"build": "tsc && tsc -p tsconfig.test.json",
"build": "tsc && shx rm -rf ./lib/@types && tsc -p tsconfig.types.json && tsc -p tsconfig.test.json",
"postbuild": "tsx ./tools/compatibility/node.ts && shx cp fixtures/server/package.json ci/fixtures/server/package.json && npm run build:deno && shx chmod +x lib/bin/index.js",
"build:deno": "esbuild src/polyfills/deno.mts --outfile=lib/polyfills/deno.mjs --format=esm",
"eslint:checker": "eslint . --ext .js,.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/modules/assert-promise.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* c8 ignore next */
import type { ParseAssertionOptions } from '../@types/assert.js';
import nodeAssert from 'node:assert';
import * as nodeAssert from 'node:assert';
import { parseAssertion } from '../helpers/parse-assertion.js';
import { nodeVersion } from '../helpers/get-runtime.js';

Expand Down
2 changes: 1 addition & 1 deletion src/modules/assert.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* c8 ignore next */
import type { ParseAssertionOptions } from '../@types/assert.js';
import nodeAssert from 'node:assert';
import * as nodeAssert from 'node:assert';
import { parseAssertion } from '../helpers/parse-assertion.js';
import { nodeVersion } from '../helpers/get-runtime.js';

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"include": ["src"],
"exclude": ["test", "tools"],
"exclude": ["test", "tools", "src/@types"],
"compilerOptions": {
"target": "ES2015",
"lib": ["ES2015"],
Expand Down
9 changes: 9 additions & 0 deletions tsconfig.types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "./tsconfig.json",
"include": ["src/@types"],
"exclude": ["test", "tools"],
"compilerOptions": {
"outDir": "lib/@types",
"emitDeclarationOnly": true
}
}

0 comments on commit 08290f0

Please sign in to comment.