1.1.0 • Published 3 years ago
ts-import-transformer v1.1.0
ts-import-transformer
Transform import and export paths to work on client and server environments.
Transforms
- User-configured path replacements
- Fix
baseUrlrelative paths - Add
.jsextension
Install
npm install --save-dev typescript ttypescript ts-import-transformerConfig
In this example, we enable the plugin and configure a path replacement for the superstruct library within our tsconfig.json:
{
"compilerOptions": {
"plugins": [
{
"transform": "ts-import-transformer",
"superstruct": "./assets/superstruct/index"
}
]
}
}Compile
npx ttsc -p tsconfig.json