37 lines
907 B
TypeScript
37 lines
907 B
TypeScript
import {defineConfig} from 'vite'
|
|
import federation from '@originjs/vite-plugin-federation';
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
server: {
|
|
port: 1333,
|
|
host: '0.0.0.0',
|
|
strictPort: true,
|
|
},
|
|
plugins: [
|
|
federation({
|
|
name: 'shared',
|
|
exposes: {
|
|
"./config": "./src/config/index.ts",
|
|
"./infra": "./src/infra/index.ts",
|
|
"./utils": "./src/utils/index.ts",
|
|
},
|
|
shared: {
|
|
axios: {generate: false, requiredVersion: '^1.12.2'}
|
|
}
|
|
})
|
|
],
|
|
build: {
|
|
target: 'esnext',
|
|
minify: false,
|
|
cssCodeSplit: true,
|
|
rollupOptions: {
|
|
input: './src/index.ts',
|
|
output: {
|
|
format: 'esm',
|
|
minifyInternalExports: false
|
|
}
|
|
}
|
|
}
|
|
})
|