fix: mock plugin error #171

This commit is contained in:
vben
2021-01-11 00:16:44 +08:00
parent 8bd20c6cd7
commit 3509ebec16
14 changed files with 54 additions and 78 deletions

View File

@@ -2,10 +2,10 @@ import type { GetManualChunk, GetManualChunkApi } from 'rollup';
//
const vendorLibs: { match: string[]; output: string }[] = [
{
match: ['xlsx'],
output: 'xlsx',
},
// {
// match: ['xlsx'],
// output: 'xlsx',
// },
];
// @ts-ignore

View File

@@ -2,7 +2,7 @@ import gzipPlugin from 'rollup-plugin-gzip';
import { isBuildGzip } from '../../utils';
import { Plugin } from 'vite';
export function configGzipPlugin(isBuild: boolean): Plugin | Plugin[] {
const useGzip = isBuild && isBuildGzip;
const useGzip = isBuild && isBuildGzip();
if (useGzip) {
return gzipPlugin();