# vite-ts-nameof

> Give Vite the ability to resolve 'nameof' calls in TypeScript

Latest version **1.0.0** (published 2021-02-27) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install vite-ts-nameof
pnpm add vite-ts-nameof
yarn add vite-ts-nameof
bun add vite-ts-nameof
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2021-02-27 |
| First published | 2021-02-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 23 |
| Author | Christopher Quadflieg |
| Maintainers | shinigami92 |
| Keywords | vite, vite-plugin, ts-nameof, nameof, plugin, typescript |

## Links

- npm: https://www.npmjs.com/package/vite-ts-nameof
- Repository: https://github.com/Shinigami92/vite-ts-nameof
- Homepage: https://github.com/Shinigami92/vite-ts-nameof#readme
- Issues: https://github.com/Shinigami92/vite-ts-nameof/issues
- npm.io page: https://npm.io/package/vite-ts-nameof

## Dependencies (1)

- [ts-nameof](https://npm.io/package/ts-nameof.md) ^5.0.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2021-02-27
- 1.0.0-alpha.3 (alpha) — 2021-02-27
- 1.0.0-alpha.2 — 2021-02-26
- 1.0.0-alpha.1 — 2021-02-26

## README

<h1 align="center">vite-ts-nameof</h1>

<p align="center">
  <a href="https://github.com/Shinigami92/vite-ts-nameof/blob/main/LICENSE">
    <img alt="license: MIT" src="https://img.shields.io/github/license/Shinigami92/vite-ts-nameof.svg?style=flat-square">
  </a>
  <a href="https://www.npmjs.com/package/vite-ts-nameof" target="_blank">
    <img alt="NPM package" src="https://img.shields.io/npm/v/vite-ts-nameof.svg?style=flat-square">
  </a>
  <a href="https://www.npmjs.com/package/vite-ts-nameof" target="_blank">
    <img alt="downloads" src="https://img.shields.io/npm/dt/vite-ts-nameof.svg?style=flat-square">
  </a>
  <a href="https://github.com/prettier/prettier" target="_blank">
    <img alt="Code style: Prettier" src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square">
  </a>
  <a href="https://github.com/Shinigami92/vite-ts-nameof/actions/workflows/ci.yml">
    <img alt="Build Status" src="https://github.com/Shinigami92/vite-ts-nameof/actions/workflows/ci.yml/badge.svg?branch=main">
  </a>
</p>

<p align="center">
  Give <a href="https://github.com/vitejs/vite" target="_blank">Vite</a> the ability to resolve <a href="https://github.com/dsherret/ts-nameof" target="_blank">nameof</a> calls in TypeScript.
</p>

## Usage

1. Install as `devDependencies`

   ```bash
   npm install -D vite-ts-nameof
   # or
   yarn add -D vite-ts-nameof
   ```

2. Inject `vite-ts-nameof` using the `vite.config.ts` module

   ```ts
   import vue from "@vitejs/plugin-vue";
   import { defineConfig } from "vite";
   import tsNameof from "vite-ts-nameof";

   // https://vitejs.dev/config/
   export default defineConfig({
     plugins: [
       tsNameof(),
       vue(),
     ],
   });
   ```

3. Add `ts-nameof.d.ts` to your `tsconfig.json`

   ```jsonc
   {
     // "compilerOptions"
     // "include"
     // ...
     "files": ["./node_modules/ts-nameof/ts-nameof.d.ts"]
   }
   ```

---
_Source: https://npm.io/package/vite-ts-nameof · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
