All Projects → bitshiftza → rollup-plugin-ts-paths

bitshiftza / rollup-plugin-ts-paths

Licence: MIT license
Resolve modules from tsconfig paths in Rollup

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to rollup-plugin-ts-paths

Learn Rollup
This is an example project to accompany a tutorial on using Rollup.
Stars: ✭ 178 (+790%)
Mutual labels:  rollup
Harold
Compares frontend project bundles
Stars: ✭ 241 (+1105%)
Mutual labels:  rollup
vue-cli-template-library
Template for developing open-source vue.js libraries with Rollup + Jest + Babel + Storybook + TravisCI + SemanticRelease
Stars: ✭ 61 (+205%)
Mutual labels:  rollup
Xdm
a modern MDX compiler. No runtime. With esbuild, Rollup, and webpack plugins
Stars: ✭ 206 (+930%)
Mutual labels:  rollup
Typescript Lib Starter
Typescript library starter
Stars: ✭ 235 (+1075%)
Mutual labels:  rollup
electron-template
Electron multiwindow mode template
Stars: ✭ 65 (+225%)
Mutual labels:  rollup
Rollup Plugin Alias
This module has moved and is now available at @rollup/plugin-alias / https://github.com/rollup/plugins
Stars: ✭ 175 (+775%)
Mutual labels:  rollup
echarts-for-svelte
📈 Baidu Echarts(v3.0 & v4.0) components for Svelte wrapper.
Stars: ✭ 25 (+25%)
Mutual labels:  rollup
React Redux Typescript Jspm Starter
Futuristic, bundle-free, development environment for building Component-Driven SPA with React, Redux and TypeScript - powered by JSPM (SystemJS & Rollup with tree-shaking)
Stars: ✭ 238 (+1090%)
Mutual labels:  rollup
svelte-pwa-now
A PWA ready Svelte v3.0 starter template with Tailwind, Now integration and optional Typescript suppot
Stars: ✭ 138 (+590%)
Mutual labels:  rollup
Rollup Plugin Esbuild
Use ESBuild with Rollup to transform ESNext and TypeScript code.
Stars: ✭ 220 (+1000%)
Mutual labels:  rollup
Modular Css
A streamlined reinterpretation of CSS Modules via CLI, API, Browserify, Rollup, Webpack, or PostCSS
Stars: ✭ 234 (+1070%)
Mutual labels:  rollup
vitext
The Next.js like React framework for better User & Developer experience!
Stars: ✭ 376 (+1780%)
Mutual labels:  rollup
Vue Plugin Template
🚀 Solid foundation to start a Vue plugin with the best developer experience and a focus on performance
Stars: ✭ 189 (+845%)
Mutual labels:  rollup
all-search
all-search 全搜,一个搜索引擎快捷跳转菜单
Stars: ✭ 105 (+425%)
Mutual labels:  rollup
Front End Tooling Recipes
Collection of pre-configured front-end tooling setups for common uses.
Stars: ✭ 176 (+780%)
Mutual labels:  rollup
firebase-functions-typescript-starter
Create & test Firebase Cloud Functions in TypeScript
Stars: ✭ 101 (+405%)
Mutual labels:  rollup
electron-vue-next
A starter template for using vue-next with the electron.
Stars: ✭ 189 (+845%)
Mutual labels:  rollup
puruvjdev2
puruvj.dev
Stars: ✭ 11 (-45%)
Mutual labels:  rollup
rollup-boilerplate
Simple boilerplate to make components libraries with React.
Stars: ✭ 13 (-35%)
Mutual labels:  rollup

rollup-plugin-ts-paths

Replace alias with resolved import from paths in tsconfig.json. Let's you use rollup to bundle/transpile code generated by tsc like this

// src/path/to/foo/foot.ts
import { Foo } from 'foo';

where foo is defined in tsconfig.json

{
  "compilerOptions": {
      "paths": {
        "foo": [
          "src/path/to/foo/foo.ts"
        ]
      }
  }
}

Installation

npm install --save-dev rollup-plugin-ts-paths

Usage

Generally, you need to ensure that rollup-plugin-ts-paths goes before other things (like rollup-plugin-commonjs) in your plugins array, so that the correc file can be resolved from an import.

// rollup.config.js
import tsConfigPaths from 'rollup-plugin-ts-paths';

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

Options

{
  // The directory the TS config file can be found in (optional)
  tsConfigDirectory: processs.cwd()
}

Limitations

Currently on the first entry of a path specified in a tsconfig.json is supported.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].