UNPKG

@vercel/microfrontends

Version:

Defines configuration and utilities for microfrontends development

30 lines (27 loc) 975 B
import { Plugin } from 'vite'; interface MicrofrontendsViteOptions { /** * An optional base path to use instead of an asset prefix. This will prefix * _all_ paths in an application with the provided string. This can be used * when it is okay if every path has a common path prefix. If an application * has URLs that don't share a common path prefix, omit this option. * * See https://vite.dev/guide/build#public-base-path for more information. */ basePath?: string; } /** * Set up Vite with necessary configuration for microfrontends. This should be * used with any framework that uses Vite as the bundler. * * Example usage: * * ```filename="vite.config.ts" * import { microfrontends } from '@vercel/microfrontends/experimental/vite'; * export default defineConfig({ * plugins: [microfrontends()], * }); * ``` */ declare function microfrontends(opts?: MicrofrontendsViteOptions): Plugin; export { microfrontends };