
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@saberhq/tsconfig
Advanced tools
Saber TypeScript configurations.
The TSConfig adds the importHelpers
, so first run:
yarn add tslib
In your tsconfig.json
, use the following:
{
"extends": "@saberhq/tsconfig/tsconfig.lib.json",
"include": ["src/", "tests/"]
}
Note that noEmit
is enabled by default, for typechecking.
We recommend creating both a CommonJS and ESM build. The CommonJS build is useful for web apps, and the ESM build is useful for server-side apps and some web apps. For this, add the following two files:
tsconfig.esm.json
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": false,
"outDir": "dist/esm/"
},
"include": ["src/"]
}
tsconfig.cjs.json
{
"extends": "./tsconfig.esm.json",
"compilerOptions": {
"module": "CommonJS",
"outDir": "dist/cjs/"
},
"include": ["src/"]
}
Additionally, modify package.json
with the following:
{
// ...
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"scripts": {
// ...
"build": "tsc -P tsconfig.cjs.json && tsc -P tsconfig.esm.json",
"clean": "rm -fr dist/",
"typecheck": "tsc"
}
}
FAQs
Saber TypeScript configurations.
The npm package @saberhq/tsconfig receives a total of 355 weekly downloads. As such, @saberhq/tsconfig popularity was classified as not popular.
We found that @saberhq/tsconfig demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.