mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-27 19:29:04 +08:00
13 lines
388 B
TypeScript
13 lines
388 B
TypeScript
import dynamicImport from 'vite-plugin-import-context';
|
|
import type { ViteEnv } from '../../utils';
|
|
import type { Plugin } from 'vite';
|
|
|
|
export function configDynamicImport(env: ViteEnv) {
|
|
const { VITE_DYNAMIC_IMPORT } = env;
|
|
const dynamicImportPlugin: Plugin = dynamicImport({
|
|
include: ['**/*.ts'],
|
|
autoImportRoute: VITE_DYNAMIC_IMPORT,
|
|
});
|
|
return dynamicImportPlugin;
|
|
}
|