Configuration
MFE Forge is configured via mfeforge.config.ts in your project root.
Configuration File
ts
export default {
name: 'my-platform',
organization: 'acme',
defaults: {
framework: 'react',
language: 'typescript',
styling: 'tailwind',
stateManagement: 'zustand',
packageManager: 'bun',
},
federation: {
plugin: '@originjs/vite-plugin-federation',
shared: ['react', 'react-dom', 'react-router-dom', 'zustand'],
},
dev: {
autoStartHost: true,
parallelLimit: 10,
portRange: [3000, 3999],
cors: true,
},
build: {
target: 'esnext',
minify: false,
cssCodeSplit: false,
sourcemap: true,
},
testing: {
unit: 'vitest',
e2e: 'playwright',
coverage: true,
},
designSystem: {
enabled: true,
tokens: true,
storybook: true,
},
ci: {
provider: 'github',
docker: true,
deployTarget: 'vercel',
},
}Configuration Options
name
- Type:
string - Description: Project name
organization
- Type:
string(optional) - Description: NPM organization scope (e.g.,
@acme)
defaults
- Type:
object - Properties:
framework:'react' | 'vue' | 'svelte'language:'typescript' | 'javascript'styling:'tailwind' | 'css-modules' | 'styled-components' | 'none'stateManagement:'zustand' | 'redux' | 'jotai' | 'none'packageManager:'bun' | 'pnpm' | 'npm'
federation
- Type:
object - Properties:
plugin: Module federation plugin to useshared: Array of shared dependency namesruntimePlugin: Custom runtime plugin path
dev
- Type:
object - Properties:
autoStartHost: Automatically start host with appsparallelLimit: Maximum parallel dev serversportRange: [min, max] port rangecors: Enable CORS in dev server
build
- Type:
object - Properties:
target: Build targetminify: Enable minificationcssCodeSplit: Split CSS into chunkssourcemap: Generate source maps
testing
- Type:
object - Properties:
unit: Unit testing frameworke2e: E2E testing frameworkcoverage: Generate coverage reports
designSystem
- Type:
object - Properties:
enabled: Enable design systemtokens: Generate design tokensstorybook: Include Storybook
ci
- Type:
object - Properties:
provider: CI providerdocker: Include Docker supportdeployTarget: Deployment target
