Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Shinigami92/vite-plugin-ts-nameof
Give Vite the ability to resolve 'nameof' calls in TypeScript
https://github.com/Shinigami92/vite-plugin-ts-nameof
awesome nameof plugin ts-nameof typescript vite vite-plugin vitejs
Last synced: about 2 months ago
JSON representation
Give Vite the ability to resolve 'nameof' calls in TypeScript
- Host: GitHub
- URL: https://github.com/Shinigami92/vite-plugin-ts-nameof
- Owner: Shinigami92
- License: mit
- Created: 2021-02-26T20:21:11.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-13T17:00:38.000Z (about 2 months ago)
- Last Synced: 2024-04-14T07:46:08.791Z (about 2 months ago)
- Topics: awesome, nameof, plugin, ts-nameof, typescript, vite, vite-plugin, vitejs
- Language: JavaScript
- Homepage:
- Size: 1.39 MB
- Stars: 19
- Watchers: 2
- Forks: 2
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Lists
- awesome-vite - vite-plugin-ts-nameof - Ability to resolve [nameof](https://github.com/dsherret/ts-nameof) in TypeScript. (Plugins / Framework-agnostic Plugins)
- awesome-vite - vite-plugin-ts-nameof - Ability to resolve [nameof](https://github.com/dsherret/ts-nameof) in TypeScript. (Plugins / Framework-agnostic Plugins)
- awesome-vite - vite-plugin-ts-nameof - Ability to resolve [nameof](https://github.com/dsherret/ts-nameof) in TypeScript. (Plugins / Framework-agnostic Plugins)
- awesome-viter - vite-plugin-ts-nameof - Ability to resolve [nameof](https://github.com/dsherret/ts-nameof) in TypeScript. (Plugins / Framework-agnostic Plugins)
- awesome-vite - vite-plugin-ts-nameof - Ability to resolve [nameof](https://github.com/dsherret/ts-nameof) in TypeScript. (Plugins / Framework-agnostic Plugins)
- awesome-vite - vite-plugin-ts-nameof - Ability to resolve [nameof](https://github.com/dsherret/ts-nameof) in TypeScript. (Plugins / Framework-agnostic Plugins)
- awesome-vite - vite-plugin-ts-nameof - Ability to resolve [nameof](https://github.com/dsherret/ts-nameof) in TypeScript. (Plugins / Framework-agnostic Plugins)
README
vite-plugin-ts-nameof
Give Vite the ability to resolve nameof calls in TypeScript.## Usage
1. Install as `devDependencies`
```bash
npm add --save-dev vite-plugin-ts-nameof @typescript-nameof/types @typescript-nameof/common-types
# or
pnpm add --save-dev vite-plugin-ts-nameof @typescript-nameof/types @typescript-nameof/common-types
# or
yarn add --dev vite-plugin-ts-nameof @typescript-nameof/types @typescript-nameof/common-types
```2. Inject `vite-plugin-ts-nameof` using the `vite.config.ts` module
```ts
import vue from '@vitejs/plugin-vue';
import { defineConfig } from 'vite';
import tsNameof from 'vite-plugin-ts-nameof';// https://vitejs.dev/config/
export default defineConfig({
plugins: [tsNameof(), vue()],
});
```3. Add `@typescript-nameof/types/index.d.cts` to your `tsconfig.json`
```jsonc
{
// "compilerOptions"
// "include"
// ...
"files": ["./node_modules/@typescript-nameof/types/index.d.cts"],
}
```## More Awesome Vite Plugins
Can be found here: [Awesome Vite.js](https://github.com/vitejs/awesome-vite#readme)