Skip to content

Commit 48c5e00

Browse files
committed
Fix build config
1 parent efe61fc commit 48c5e00

File tree

7 files changed

+144
-35
lines changed

7 files changed

+144
-35
lines changed

packages/core/package.json

Lines changed: 65 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,36 +21,84 @@
2121
},
2222
"./dist/*": "./dist/*",
2323
"./formatQuery": {
24-
"types": "./dist/formatQuery.d.ts",
25-
"default": "./dist/formatQuery.js"
24+
"import": {
25+
"types": "./dist/formatQuery.d.mts",
26+
"import": "./dist/formatQuery.mjs"
27+
},
28+
"require": {
29+
"types": "./dist/formatQuery.d.ts",
30+
"default": "./dist/formatQuery.js"
31+
}
2632
},
2733
"./parseCEL": {
28-
"types": "./dist/parseCEL.d.ts",
29-
"default": "./dist/parseCEL.js"
34+
"import": {
35+
"types": "./dist/parseCEL.d.mts",
36+
"import": "./dist/parseCEL.mjs"
37+
},
38+
"require": {
39+
"types": "./dist/parseCEL.d.ts",
40+
"default": "./dist/parseCEL.js"
41+
}
3042
},
3143
"./parseJSONata": {
32-
"types": "./dist/parseJSONata.d.ts",
33-
"default": "./dist/parseJSONata.js"
44+
"import": {
45+
"types": "./dist/parseJSONata.d.mts",
46+
"import": "./dist/parseJSONata.mjs"
47+
},
48+
"require": {
49+
"types": "./dist/parseJSONata.d.ts",
50+
"default": "./dist/parseJSONata.js"
51+
}
3452
},
3553
"./parseJsonLogic": {
36-
"types": "./dist/parseJsonLogic.d.ts",
37-
"default": "./dist/parseJsonLogic.js"
54+
"import": {
55+
"types": "./dist/parseJsonLogic.d.mts",
56+
"import": "./dist/parseJsonLogic.mjs"
57+
},
58+
"require": {
59+
"types": "./dist/parseJsonLogic.d.ts",
60+
"default": "./dist/parseJsonLogic.js"
61+
}
3862
},
3963
"./parseMongoDB": {
40-
"types": "./dist/parseMongoDB.d.ts",
41-
"default": "./dist/parseMongoDB.js"
64+
"import": {
65+
"types": "./dist/parseMongoDB.d.mts",
66+
"import": "./dist/parseMongoDB.mjs"
67+
},
68+
"require": {
69+
"types": "./dist/parseMongoDB.d.ts",
70+
"default": "./dist/parseMongoDB.js"
71+
}
4272
},
4373
"./parseSpEL": {
44-
"types": "./dist/parseSpEL.d.ts",
45-
"default": "./dist/parseSpEL.js"
74+
"import": {
75+
"types": "./dist/parseSpEL.d.mts",
76+
"import": "./dist/parseSpEL.mjs"
77+
},
78+
"require": {
79+
"types": "./dist/parseSpEL.d.ts",
80+
"default": "./dist/parseSpEL.js"
81+
}
4682
},
4783
"./parseSQL": {
48-
"types": "./dist/parseSQL.d.ts",
49-
"default": "./dist/parseSQL.js"
84+
"import": {
85+
"types": "./dist/parseSQL.d.mts",
86+
"import": "./dist/parseSQL.mjs"
87+
},
88+
"require": {
89+
"types": "./dist/parseSQL.d.ts",
90+
"default": "./dist/parseSQL.js"
91+
}
5092
},
5193
"./transformQuery": {
52-
"types": "./dist/transformQuery.d.ts",
53-
"default": "./dist/transformQuery.js"
94+
"import": {
95+
"types": "./dist/transformQuery.d.mts",
96+
"import": "./dist/transformQuery.mjs"
97+
},
98+
"require": {
99+
"types": "./dist/transformQuery.d.ts",
100+
"default": "./dist/transformQuery.js"
101+
}
54102
}
55103
},
56104
"react-native": "dist/react-querybuilder_core.mjs",
@@ -143,4 +191,4 @@
143191
"typecheck": "tsc --noEmit",
144192
"typecheck:watch": "tsc --noEmit --watch"
145193
}
146-
}
194+
}

packages/core/tsdown.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ export default defineConfig(async options => {
1818

1919
return [
2020
...buildConfig,
21+
{
22+
...options,
23+
entry: utilEntryPoints,
24+
sourcemap: true,
25+
platform: 'neutral',
26+
},
2127
{
2228
...options,
2329
entry: utilEntryPoints,

packages/react-querybuilder/package.json

Lines changed: 65 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,36 +28,84 @@
2828
}
2929
},
3030
"./formatQuery": {
31-
"types": "./dist/formatQuery.d.ts",
32-
"default": "./dist/formatQuery.js"
31+
"import": {
32+
"types": "./dist/formatQuery.d.mts",
33+
"import": "./dist/formatQuery.mjs"
34+
},
35+
"require": {
36+
"types": "./dist/formatQuery.d.ts",
37+
"default": "./dist/formatQuery.js"
38+
}
3339
},
3440
"./parseCEL": {
35-
"types": "./dist/parseCEL.d.ts",
36-
"default": "./dist/parseCEL.js"
41+
"import": {
42+
"types": "./dist/parseCEL.d.mts",
43+
"import": "./dist/parseCEL.mjs"
44+
},
45+
"require": {
46+
"types": "./dist/parseCEL.d.ts",
47+
"default": "./dist/parseCEL.js"
48+
}
3749
},
3850
"./parseJSONata": {
39-
"types": "./dist/parseJSONata.d.ts",
40-
"default": "./dist/parseJSONata.js"
51+
"import": {
52+
"types": "./dist/parseJSONata.d.mts",
53+
"import": "./dist/parseJSONata.mjs"
54+
},
55+
"require": {
56+
"types": "./dist/parseJSONata.d.ts",
57+
"default": "./dist/parseJSONata.js"
58+
}
4159
},
4260
"./parseJsonLogic": {
43-
"types": "./dist/parseJsonLogic.d.ts",
44-
"default": "./dist/parseJsonLogic.js"
61+
"import": {
62+
"types": "./dist/parseJsonLogic.d.mts",
63+
"import": "./dist/parseJsonLogic.mjs"
64+
},
65+
"require": {
66+
"types": "./dist/parseJsonLogic.d.ts",
67+
"default": "./dist/parseJsonLogic.js"
68+
}
4569
},
4670
"./parseMongoDB": {
47-
"types": "./dist/parseMongoDB.d.ts",
48-
"default": "./dist/parseMongoDB.js"
71+
"import": {
72+
"types": "./dist/parseMongoDB.d.mts",
73+
"import": "./dist/parseMongoDB.mjs"
74+
},
75+
"require": {
76+
"types": "./dist/parseMongoDB.d.ts",
77+
"default": "./dist/parseMongoDB.js"
78+
}
4979
},
5080
"./parseSpEL": {
51-
"types": "./dist/parseSpEL.d.ts",
52-
"default": "./dist/parseSpEL.js"
81+
"import": {
82+
"types": "./dist/parseSpEL.d.mts",
83+
"import": "./dist/parseSpEL.mjs"
84+
},
85+
"require": {
86+
"types": "./dist/parseSpEL.d.ts",
87+
"default": "./dist/parseSpEL.js"
88+
}
5389
},
5490
"./parseSQL": {
55-
"types": "./dist/parseSQL.d.ts",
56-
"default": "./dist/parseSQL.js"
91+
"import": {
92+
"types": "./dist/parseSQL.d.mts",
93+
"import": "./dist/parseSQL.mjs"
94+
},
95+
"require": {
96+
"types": "./dist/parseSQL.d.ts",
97+
"default": "./dist/parseSQL.js"
98+
}
5799
},
58100
"./transformQuery": {
59-
"types": "./dist/transformQuery.d.ts",
60-
"default": "./dist/transformQuery.js"
101+
"import": {
102+
"types": "./dist/transformQuery.d.mts",
103+
"import": "./dist/transformQuery.mjs"
104+
},
105+
"require": {
106+
"types": "./dist/transformQuery.d.ts",
107+
"default": "./dist/transformQuery.js"
108+
}
61109
}
62110
},
63111
"react-native": "dist/react-querybuilder.mjs",
@@ -155,4 +203,4 @@
155203
"typecheck": "tsc --noEmit",
156204
"typecheck:watch": "tsc --noEmit --watch"
157205
}
158-
}
206+
}

packages/react-querybuilder/src/barrel.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
export * from '@react-querybuilder/core';
21
export * from './context';
32
export * from './defaults';
43
export * from './hooks';

packages/react-querybuilder/src/index.debug.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
export * from '@react-querybuilder/core';
12
export * from './barrel';
23
export * from './components/index.debug';
34
export { QueryBuilder as default } from './components/index.debug';

packages/react-querybuilder/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
export * from '@react-querybuilder/core';
12
export * from './barrel';
23
export * from './components';
34
export { QueryBuilder as default } from './components';

packages/react-querybuilder/tsdown.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ export default defineConfig(async options => {
3636

3737
return [
3838
...buildConfig,
39+
{
40+
...options,
41+
entry: utilEntryPoints,
42+
sourcemap: true,
43+
platform: 'neutral',
44+
},
3945
{
4046
...options,
4147
entry: utilEntryPoints,

0 commit comments

Comments
 (0)