Package Exports
- rollup-plugin-typescript-paths
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rollup-plugin-typescript-paths) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
rollup-plugin-typescript-paths
Rollup Plugin to automatically resolve path aliases set in the compilerOptions section of tsconfig.json.
For example, if you have
// tsconfig.json
{
"compilerOptions": {
// ...
"baseUrl": ".",
"paths": {
"@utils": ["src/helpers/utils"]
}
}
}import { something } from '@utils';Then this plugin will make sure that rollup knows how to resolve @utils.
Installation
npm install --save-dev rollup-plugin-typescript-pathsUsage
import { resolveTypescriptPaths } from 'rollup-plugin-typescript-paths';
export default {
// ...
plugins: [
resolveTypescriptPaths()
]
}Options
tsConfigPath: If the plugin has trouble finding yourtsconfig.json, you can pass the path to it via this option.
License
MIT.