This package has been deprecated

Author message:

Project was renamed to vite-plugin-ts-nameof

vite-ts-nameof
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

vite-ts-nameof

license: MIT NPM package downloads Code style: Prettier Build Status

Give Vite the ability to resolve nameof calls in TypeScript.

Usage

  1. Install as devDependencies

    npm install -D vite-ts-nameof
    # or
    yarn add -D vite-ts-nameof
  2. Inject vite-ts-nameof using the vite.config.ts module

    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

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

Package Sidebar

Install

npm i vite-ts-nameof

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

6.78 kB

Total Files

9

Last publish

Collaborators

  • shinigami92