Skip to content

Commit 3d26927

Browse files
committed
fix: fix declaration variables __PACKAGE_NAME and __PACKAGE_VERSION, close #118
1 parent 4fba169 commit 3d26927

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

eslint.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ import config from '@pengzhanbo/eslint-config'
33
export default config({
44
pnpm: true,
55
vue: false,
6+
globals: {
7+
__PACKAGE_NAME__: 'readonly',
8+
__PACKAGE_VERSION__: 'readonly',
9+
},
610
}, {
711
files: ['**/*.md/*.ts'],
812
rules: {

plugin/src/core/build.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ import c from 'picocolors'
1414
import { aliasMatches, transformWithEsbuild } from './compiler'
1515
import { lookupFile, normalizePath } from './utils'
1616

17-
declare const __PACKAGE_NAME__: string
18-
declare const __PACKAGE_VERSION__: string
19-
2017
type PluginContext<T = Plugin['buildEnd']> = T extends (
2118
this: infer R,
2219
...args: any[]

plugin/src/shim.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
declare const __PACKAGE_NAME__: string
2+
declare const __PACKAGE_VERSION__: string

0 commit comments

Comments
 (0)