0.1.9 • Published 2 years ago

@rastiq/vite-plugin-lowcode v0.1.9

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

@iteria-app/vite-plugin-lowcode npm

Usage

//vite.config.ts
import iteriaLowcode from '@iteria-app/vite-plugin-lowcode'

export default {
  plugins: [
    iteriaLowcode({
      graphQLEndpoint: 'https://your.endpoint.com/graphql',
      injectMode: 'jamstack'
    })
  ]
}

Options

export interface Options {
  graphQLEndpoint: string
  injectMode?: 'jamstack' | 'devsever'
  version?: number
  features?: {
    tippy?: boolean
    generator?: boolean
    addFields?: boolean
    translations?: boolean
    themeEditor?: boolean
    graphQLEndpoint?: boolean
    floatingButton?: boolean
    erd?: boolean,
    commit?: boolean,
    save?: boolean
  }
  whitelistedEnvs?: string[]
  development?: boolean
}

Examples for passing options to plugin

export default {
  plugins: [
    iteriaLowcode({
      graphQLEndpoint: 'https://your.endpoint.com/graphql',
      injectMode: 'jamstack', //enabling transpilation and bundling in browser with virtual file system
      features: {
        tippy: true, //explicitly enables tippy feature
        translations: false, //turns off translation sheet feature in floating action button
        themeEditor: true, //turns off themeEditor feature
      },
      whitelistedEnvs: ['VITE_HASURA_GRAPHQL_ENDPOINT'] //envs exposed to lowcode (user can use import.meta.env.VARIABLE_NAME which is replaced during transpilation)
    }),
  ],
}