faltjs plugin to automatically resolve path aliases set in the compilerOptions section of tsconfig.json. Don't use it if you're already using rollup-plugin-typescript. This plugin is only for use cases where your TypeScript code has already been transpile
faltjs plugin to automatically resolve path aliases set in the compilerOptions section of tsconfig.json.
Don't use it if you're already using rollup-plugin-typescript. This plugin is only for use cases where your TypeScript code has already been transpiled before rollup runs.
``json`
// tsconfig.json
{
"compilerOptions": {
// ...
"baseUrl": ".",
"paths": {
"@utils": ["src/helpers/utils"]
}
}
}
`ts`
import { something } from '@utils';
Then this plugin will make sure that rollup knows how to resolve @utils.
typescript is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import ts from 'typescript;