tsswc
v1.0.9
Published
Transpile TypeScript to JavaScript using SWC
Downloads
12
Maintainers
Readme
TSSWC
A library for compiling TypeScript into JavaScript using SWC.
Compiler reads from tsconfig.json.
Table of Contents
Install
npm i tsswc --save-dev
npm i @neumatter/swc-plugin-add-ext --save-dev
Usage
./tsconfig.json:
{
"$schema": "https://json.schemastore.org/tsconfig",
"include": ["src/**/*"],
"exclude": ["dist", ".build", "node_modules"],
"compilerOptions": {
"rootDir": "./src" /* Specify the root folder within your source files. */,
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
}
}
Emit declaration files:
tsswc --dts
Compile only:
tsswc
Compile & run without emitting files:
node --loader=tsswc/loader.js ./test/index.ts