perf(mock): when mock is not used, move mock.js out of the package file

This commit is contained in:
vben
2021-01-22 22:42:27 +08:00
parent c889fb174b
commit 43503d5970
11 changed files with 50 additions and 56 deletions

View File

@@ -9,6 +9,7 @@ import { GLOB_CONFIG_FILE_NAME } from '../../constant';
export function configHtmlPlugin(env: ViteEnv, isBuild: boolean) {
const { VITE_GLOB_APP_TITLE, VITE_PUBLIC_PATH } = env;
const path = VITE_PUBLIC_PATH.endsWith('/') ? VITE_PUBLIC_PATH : `${VITE_PUBLIC_PATH}/`;
const htmlPlugin: Plugin[] = html({
minify: isBuild,
inject: {