提交
This commit is contained in:
31
front-end/app-shared/vite.config.ts
Normal file
31
front-end/app-shared/vite.config.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import {defineConfig} from 'vite'
|
||||
import federation from '@originjs/vite-plugin-federation';
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user