vue-cli-plugin-ts-paths

Configure path aliases only once and in the right place (tsconfig.json)
1,870
Install
npm install vue-cli-plugin-ts-paths
Latest Version:0.0.4
License:MIT
Last Updated:Sep 25, 2022
Links: GitHub  ·  npm
Maintainer: vatson

:ambulance: vue-cli-plugin-ts-paths

DRY, configure path aliases only once and in the right place.

Never heard of path aliases? One of many articles on how it makes our life easier https://netbasal.com/sexier-imports-in-typescript-e3c645bdd3c6

Use case

You are tired of duplicating code when you need to add a new path alias (alias section in webpack config and paths section in tsconfig.json).

Now you can add it only to tsconfig.json and no longer worry about the rest

Getting Started

A new project

If yon don't have a project, you can create TypeScript project using vue cli:

vue create my-vue-lib

Or use preset vatson/vue-ts-lib that includes ts-paths and ts-bundler plugins to speed up the development of any components library More information you can find here https://github.com/vatson/vue-ts-lib

Adding to a project

Install the plugin into your project:

cd my-vue-app
vue add ts-paths

That's it. You do not have to do anything else. Just add new aliases to tsconfig.json.

License

MIT

Related Packages

vue-cli-plugin-vue-i18n

vue-cli 3 plugin to add vue-i18n

6,615
vue-cli-plugin-lodash

vue-cli plugin for lodash

4,260 4
@phiny1/vue-cli-plugin-p11n

Vue CLI 3 plugin to pluginize your Vue project

3,992
vue-cli-plugin-p11n

Vue CLI 3 plugin to pluginize your Vue project

2,767 111
vue-cli-plugin-vplugin

Vue CLI 3 plugin to pluginize your Vue project based off p11n

1,142 0

Version History

Version Released License
0.0.4 MIT
0.0.3 MIT
0.0.2 MIT
0.0.1 MIT