diff --git a/lib/index.ts b/lib/index.ts index b4338d2..cd7d544 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -1,11 +1,13 @@ -import { App, Plugin } from 'vue' +import { App } from 'vue' import V3waterfall from './v3-waterfall.vue' +export { V3waterfall } -V3waterfall.install = function (app: App) { - app.component(V3waterfall.name, V3waterfall) - - return app +const V3waterfallInstance = { + install: (app: App): App => { + app.component(V3waterfall.name, V3waterfall) + return app + } } -export default V3waterfall as typeof V3waterfall & Plugin +export default V3waterfallInstance diff --git a/package.json b/package.json index 552aece..8b54c58 100644 --- a/package.json +++ b/package.json @@ -4,17 +4,12 @@ "private": false, "main": "./dist/v3-waterfall.umd.js", "module": "./dist/v3-waterfall.es.js", + "types": "./dist/typings/index.d.ts", "exports": { "./dist/style.css": "./dist/style.css", ".": { - "import": { - "types": "./dist/typings/index.d.ts", - "default": "./dist/v3-waterfall.es.js" - }, - "require": { - "types": "./dist/typings/index.d.ts", - "default": "./dist/v3-waterfall.umd.js" - } + "import": "./dist/v3-waterfall.es.js", + "require": "./dist/v3-waterfall.umd.js" } }, "files": [