diff --git a/packages/vant-popperjs/rollup.config.js b/packages/vant-popperjs/rollup.config.js index 162b32861..2a4f45f35 100644 --- a/packages/vant-popperjs/rollup.config.js +++ b/packages/vant-popperjs/rollup.config.js @@ -14,5 +14,8 @@ export default { format: 'esm', }, ], - plugins: [nodeResolve(), babel({ babelHelpers: 'runtime' })], + plugins: [ + babel({ babelHelpers: 'runtime', extensions: ['.js', '.ts'] }), + nodeResolve(), + ], }; diff --git a/packages/vant-popperjs/src/index.ts b/packages/vant-popperjs/src/index.ts index bc3f0ded6..76cb8bd92 100644 --- a/packages/vant-popperjs/src/index.ts +++ b/packages/vant-popperjs/src/index.ts @@ -1,4 +1,6 @@ import { createPopper } from '@popperjs/core/lib/popper-lite'; import offsetModifier from '@popperjs/core/lib/modifiers/offset'; +import type { Instance, Placement } from '@popperjs/core'; export { createPopper, offsetModifier }; +export type { Instance, Placement };