Nonprofit Pizza Maker

    aslemammad-vite-plugin-macro
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.0 • Public • Published

    vite-plugin-macro

    Getting Started

    $ npm install -D vite-plugin-macro
    # or
    $ yarn add -D vite-plugin-macro

    Usage

    For more details, see documentation for typed-macro.

    // vite.config.ts
    
    import { defineConfig } from 'vite'
    // a package or module that exports macro provider
    import { provideEcho } from 'some-macro-provider'
    import { createMacroPlugin } from 'vite-plugin-macro'
    import { join } from 'path'
    
    const macroPlugin = createMacroPlugin({
      // the generated `.d.ts` file will include the types of macros
      typesPath: join(__dirname, './macros.d.ts'),
    }).use(provideEcho()) // use a macro provider
    
    export default defineConfig({
      plugins: [macroPlugin],
    })

    This package also re-exports @typed-macro/core so you can define macros directly in your projects.

    Keywords

    none

    Install

    npm i aslemammad-vite-plugin-macro

    DownloadsWeekly Downloads

    699

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    14.1 kB

    Total Files

    5

    Last publish

    Collaborators

    • aslemammad