Skip to content

Commit

Permalink
fix: allow explicit index import in pure ESM context
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Oct 3, 2023
1 parent f609dd4 commit 1e2b6aa
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions index.d.cts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './index.d';
1 change: 1 addition & 0 deletions index.d.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './index.d';
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type PostHTML from "posthtml";
import type terser from "terser";
import type { Options as CssNanoOptions } from "cssnano";
import type { OptimizeOptions as SvgoOptimizeOptions } from "svgo";
import type { Config as SvgoOptimizeOptions } from "svgo";

export interface HtmlnanoOptions {
skipConfigLoading?: boolean;
Expand Down
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
".": {
"require": "./index.cjs",
"import": "./index.mjs"
},
"./index.mjs": {
"import": "./index.mjs"
},
"./index.cjs": {
"require": "./index.cjs"
}
},
"types": "index.d.ts",
Expand Down

0 comments on commit 1e2b6aa

Please sign in to comment.