Commit 06e1d3879be187f99f5142e054884e1c09ac8dfa
1 parent
d51cfe51
fix: fix require error
Showing
1 changed file
with
2 additions
and
2 deletions
build/vite/plugin/index.ts
@@ -11,8 +11,8 @@ import gzipPlugin from './gzip/index'; | @@ -11,8 +11,8 @@ import gzipPlugin from './gzip/index'; | ||
11 | 11 | ||
12 | import { hmScript } from '../hm'; | 12 | import { hmScript } from '../hm'; |
13 | 13 | ||
14 | -const pkg = require('../../../package.json'); | ||
15 | - | 14 | +// @ts-ignore |
15 | +import pkg from '../../../package.json'; | ||
16 | import { isDevFn, isProdFn, isSiteMode, ViteEnv, isReportMode, isBuildGzip } from '../../utils'; | 16 | import { isDevFn, isProdFn, isSiteMode, ViteEnv, isReportMode, isBuildGzip } from '../../utils'; |
17 | import { GLOB_CONFIG_FILE_NAME } from '../../constant'; | 17 | import { GLOB_CONFIG_FILE_NAME } from '../../constant'; |
18 | 18 |