Skip to content

Commit

Permalink
fix: add file extension to import path to support Node16 module resol…
Browse files Browse the repository at this point in the history
…ution
  • Loading branch information
frederikprijck committed Aug 2, 2023
1 parent 40b68ed commit 4e32d7a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ const jestConfig: JestConfigWithTsJest = {
"default",
["jest-junit", { outputDirectory: "test-results/jest" }],
],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
coverageReporters: ["lcov", "text", "text-summary"],
setupFiles: [],
preset: "ts-jest/presets/default-esm",
Expand Down
2 changes: 1 addition & 1 deletion lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { base64UrlDecode } from "./base64_url_decode";
import { base64UrlDecode } from "./base64_url_decode.js";

export interface JwtDecodeOptions {
header?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion lib/index.umd.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { jwtDecode as default } from './index';
export { jwtDecode as default } from './index.js';

0 comments on commit 4e32d7a

Please sign in to comment.