⚠️ Drop support for Vue < 2.7 (no more npm install errors caused by @vue/composition-api as a peer dependency, fixes #576)
⚠️ Drop support for browsers without ResizeObserver (polyfill is required if you want to support older browsers)
⚠️ Remove UMD output
Move to ESM (fixes #627, #782)
Checklist
[x] Use ResizeObserver instead of the resize-detector package
[x] Remove the extra wrapper and simplify styles
[x] Move to `"type": "module"
[x] Add pkg.exports
[x] Update Rollup and plugins
[ ] Update build scripts (WIP)
Blocker
types is now inferred by TypeScript itself and we are currently generating several copies of index.d.ts (as suggested by @xiaoxiangmoe), so we need to replacing their content during postinstall according to the Vue version. But for local development or CI/CD, we do not have index.vue{3,2}.d.ts the moment we run postinstall yet, which currently leads to deployment failures. (We used to just need to rewrite the pkg.types field to a different file name in postinstall.) So we need to find a way to fix this. Things to investigate:
What issue will occur if we change to specifying types in pkg.exports?
Can we just use the index.vue3.d.ts file generated in Vue 3 environment for Vue 2 projects so that we actually don't need to maintain a manually written index.vue2.d.ts file and the postinstall script?
Major changes
@vue/composition-api
as a peer dependency, fixes #576)ResizeObserver
(polyfill is required if you want to support older browsers)Checklist
ResizeObserver
instead of theresize-detector
packagepkg.exports
Blocker
types
is now inferred by TypeScript itself and we are currently generating several copies ofindex.d.ts
(as suggested by @xiaoxiangmoe), so we need to replacing their content duringpostinstall
according to the Vue version. But for local development or CI/CD, we do not haveindex.vue{3,2}.d.ts
the moment we runpostinstall
yet, which currently leads to deployment failures. (We used to just need to rewrite thepkg.types
field to a different file name inpostinstall
.) So we need to find a way to fix this. Things to investigate:types
inpkg.exports
?index.vue3.d.ts
file generated in Vue 3 environment for Vue 2 projects so that we actually don't need to maintain a manually writtenindex.vue2.d.ts
file and thepostinstall
script?