JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 25059
  • Score
    100M100P100Q141782F
  • License MIT

Rollup Plugin to automatically resolve path aliases set in the compilerOptions section of tsconfig.json.

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

Actions Status

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-paths

Usage

import { resolveTypescriptPaths } from 'rollup-plugin-typescript-paths';

export default {
  // ...
  plugins: [
    resolveTypescriptPaths()
  ]
}

Options

  • tsConfigPath: If the plugin has trouble finding your tsconfig.json, you can pass the path to it via this option.

License

MIT.