Skip to content

Commit 8509530

Browse files
committed
feat(refactor): use named export instead of default
BREAKING CHANGE: use `import {compute}` instead of `import compute`
1 parent 0c4eb48 commit 8509530

File tree

5 files changed

+7249
-15949
lines changed

5 files changed

+7249
-15949
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,13 @@ npm i compute-scroll-into-view
3131
You can also use it from a CDN:
3232

3333
```js
34-
const { default: compute } = await import(
35-
'https://esm.sh/compute-scroll-into-view'
36-
)
34+
const { compute } = await import('https://esm.sh/compute-scroll-into-view')
3735
```
3836

3937
# Usage
4038

4139
```js
42-
import compute from 'compute-scroll-into-view'
40+
import { compute } from 'compute-scroll-into-view'
4341

4442
const node = document.getElementById('hero')
4543

integration/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import compute from '../dist/index.js'
1+
import { compute } from '../dist/index.js'
22
window.computeScrollIntoView = compute
33

44
window.mapActions = (item) => ({

0 commit comments

Comments
 (0)