fix: cannot read properties of undefined (reading 'offsetWidthi')
This commit is contained in:
@@ -7,13 +7,19 @@ import * as path from 'path'
|
||||
import imagemin from 'unplugin-imagemin/vite'
|
||||
import viteCompression from 'vite-plugin-compression'
|
||||
import { createHtmlPlugin } from 'vite-plugin-html'
|
||||
import legacy from '@vitejs/plugin-legacy'
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-expect-error
|
||||
//配置参数
|
||||
export default defineConfig(({ mode }) => {
|
||||
const env = loadEnv(mode, process.cwd())
|
||||
return {
|
||||
plugins: [
|
||||
react(),
|
||||
legacy({
|
||||
targets: ['defaults', 'ie >= 11', 'chrome 52'],
|
||||
additionalLegacyPolyfills: ['regenerator-runtime/runtime'],
|
||||
}),
|
||||
// 修改 icons 相关配置
|
||||
createSvgIconsPlugin({
|
||||
// 指定需要缓存的图标文件夹
|
||||
|
Reference in New Issue
Block a user