Skip to content

Commit 6dbc1aa

Browse files
authored
Merge pull request #33 from Enrise/fix-import-exports
Fix export import of modules
2 parents 35fb5d9 + edaf751 commit 6dbc1aa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1980
-210
lines changed

babel.config.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"presets": [
3+
"@babel/preset-typescript"
4+
],
5+
"env": {
6+
"cjs": {
7+
"presets": [
8+
[
9+
"@babel/preset-env",
10+
{
11+
"targets": {
12+
"node": "current"
13+
},
14+
"modules": "commonjs",
15+
"loose": true
16+
}
17+
]
18+
],
19+
"plugins": [
20+
[
21+
"@babel/plugin-transform-modules-commonjs",
22+
{
23+
"strict": true,
24+
"noInterop": true
25+
}
26+
],
27+
[
28+
"babel-plugin-replace-import-extension",
29+
{
30+
"extMapping": {
31+
".js": ".cjs",
32+
".ts": ".cjs"
33+
}
34+
}
35+
]
36+
]
37+
},
38+
"esm": {
39+
"presets": [
40+
[
41+
"@babel/preset-env",
42+
{
43+
"targets": {
44+
"node": "current"
45+
},
46+
"modules": false
47+
}
48+
]
49+
],
50+
"plugins": [
51+
[
52+
"babel-plugin-replace-import-extension",
53+
{
54+
"extMapping": {
55+
".ts": ".js"
56+
}
57+
}
58+
]
59+
]
60+
}
61+
},
62+
"ignore": [
63+
"src/**/*.d.ts",
64+
"src/**/test.ts"
65+
],
66+
"retainLines": true
67+
}

examples/abortOrder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createPayNLClient } from '../src';
1+
import { createPayNLClient } from '../src/index.ts';
22

33
const payNL = createPayNLClient({ password: 'your-api-token' });
44

examples/addPayment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createPayNLClient } from '../src';
1+
import { createPayNLClient } from '../src/index.ts';
22

33
const payNL = createPayNLClient({ password: 'your-api-token' });
44

examples/cancelOrder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createPayNLClient } from '../src';
1+
import { createPayNLClient } from '../src/index.ts';
22

33
const payNL = createPayNLClient({ password: 'your-api-token' });
44

examples/createOrder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createPayNLClient, ApiError } from '../src';
1+
import { createPayNLClient, ApiError } from '../src/index.ts';
22

33
const payNL = createPayNLClient({ password: 'your-api-token' });
44

examples/directDebit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createPayNLClient } from '../src';
1+
import { createPayNLClient } from '../src/index.ts';
22

33
const payNL = createPayNLClient({ username: 'AT-1234-5678', password: 'your-api-token' });
44

examples/fetchOrder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createPayNLClient } from '../src';
1+
import { createPayNLClient } from '../src/index.ts';
22

33
const payNL = createPayNLClient({ password: 'your-api-token' });
44

examples/getPaymentMethods.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createPayNLClient } from '../src';
1+
import { createPayNLClient } from '../src/index.ts';
22

33
const payNL = createPayNLClient({ username: 'AT-1234-5678', password: 'your-api-token' });
44

examples/orderStatus.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createPayNLClient } from '../src';
1+
import { createPayNLClient } from '../src/index.ts';
22

33
const payNL = createPayNLClient({ password: 'your-api-token' });
44

examples/serviceConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createPayNLClient } from '../src';
1+
import { createPayNLClient } from '../src/index.ts';
22

33
const payNL = createPayNLClient({ password: 'your-api-token' });
44

0 commit comments

Comments
 (0)