File tree Expand file tree Collapse file tree 5 files changed +8
-7
lines changed Expand file tree Collapse file tree 5 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 22
22
"publishConfig" : {
23
23
"access" : " public"
24
24
},
25
- "module" : " dist/redux-toolkit.esm.mjs " ,
25
+ "module" : " dist/redux-toolkit.legacy- esm.js " ,
26
26
"main" : " dist/cjs/index.js" ,
27
27
"types" : " dist/index.d.ts" ,
28
28
"exports" : {
98
98
"run-build" : " tsx ./scripts/build.ts" ,
99
99
"build-ci" : " yarn rimraf dist && yarn tsc && yarn run-build --skipExtraction" ,
100
100
"build-prepare" : " npm run build-ci" ,
101
- "build" : " yarn rimraf dist && yarn tsc && yarn run-build --local --skipExtraction" ,
101
+ "build" : " yarn rimraf dist && echo Compiling... && yarn tsc && yarn run-build --local --skipExtraction" ,
102
102
"build-only" : " yarn rimraf dist && yarn tsc && yarn run-build --skipExtraction" ,
103
103
"format" : " prettier --write \" (src|examples)/**/*.{ts,tsx}\" \" **/*.md\" " ,
104
104
"format:check" : " prettier --list-different \" (src|examples)/**/*.{ts,tsx}\" \" docs/*/**.md\" " ,
Original file line number Diff line number Diff line change 3
3
"version" : " 1.0.0" ,
4
4
"description" : " " ,
5
5
"type" : " module" ,
6
- "module" : " ../dist/query/rtk-query.esm.mjs " ,
6
+ "module" : " ../dist/query/rtk-query.legacy- esm.js " ,
7
7
"main" : " ../dist/query/cjs/index.js" ,
8
8
"types" : " ./../dist/query/index.d.ts" ,
9
9
"exports" : {
Original file line number Diff line number Diff line change 3
3
"version" : " 1.0.0" ,
4
4
"description" : " " ,
5
5
"type" : " module" ,
6
- "module" : " ../../dist/query/react/rtk-query-react.esm.mjs " ,
6
+ "module" : " ../../dist/query/react/rtk-query-react.legacy- esm.js " ,
7
7
"main" : " ../../dist/query/react/cjs/index.js" ,
8
8
"types" : " ./../../dist/query/react/index.d.ts" ,
9
9
"exports" : {
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ const buildTargets: BuildOptions[] = [
63
63
// which doesn't support `exports` field or optional chaining
64
64
{
65
65
format : 'esm' ,
66
- name : 'esm' ,
66
+ name : 'legacy- esm' ,
67
67
target : 'esnext' ,
68
68
minify : false ,
69
69
env : '' ,
@@ -154,7 +154,8 @@ async function bundle(options: BuildOptions & EntryPointOptions) {
154
154
folderSegments . push ( 'cjs' )
155
155
}
156
156
157
- const extension = format === 'esm' ? 'mjs' : 'cjs'
157
+ const extension =
158
+ name === 'legacy-esm' ? 'js' : format === 'esm' ? 'mjs' : 'cjs'
158
159
159
160
const outputFolder = path . join ( ...folderSegments )
160
161
const outputFilename = `${ prefix } .${ name } .${ extension } `
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ export interface BuildOptions {
3
3
name :
4
4
| 'development'
5
5
| 'production.min'
6
- | 'esm'
6
+ | 'legacy- esm'
7
7
| 'modern'
8
8
| 'modern.development'
9
9
| 'modern.production.min'
You can’t perform that action at this time.
0 commit comments