Skip to content

Commit 2dd3db3

Browse files
committed
fix!: export as ESM
1 parent 213916b commit 2dd3db3

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { PluginCreator } from 'tailwindcss/types/config'
1+
import type { PluginCreator } from 'tailwindcss/types/config.js'
22

33
/**
44
* Tailwind plugin for hide scrollbars, although the element can still be scrolled if the element's content overflows.
@@ -35,4 +35,4 @@ const scrollbarHide: PluginCreator = ({ addUtilities }) =>
3535
})
3636

3737
// override type for v3/4 compatibility
38-
export = scrollbarHide as () => void
38+
export default scrollbarHide as () => void

tsconfig.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
{
22
"compilerOptions": {
33
"moduleDetection": "force",
4-
"module": "Preserve",
4+
"module": "NodeNext",
55
"resolveJsonModule": true,
66
"allowJs": true,
77
"esModuleInterop": true,
88
"isolatedModules": true,
99
"outDir": "dist",
10-
"declaration": true
10+
"declaration": true,
11+
"moduleResolution": "NodeNext",
12+
"target": "ES2021",
1113
},
1214
"include": [
1315
"src/**/*"

0 commit comments

Comments
 (0)