1.0.0 • Published 3 years ago

vite-ts-nameof v1.0.0

Weekly downloads
24
License
MIT
Repository
github
Last release
3 years ago

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"]
    }