File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ jobs:
145145 run : yarn test
146146 if : matrix.example != 'are-the-types-wrong'
147147
148- - name : Run test step
148+ - name : Run test step (attw)
149149 working-directory : ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
150150 # Ignore "FalseCJS" errors in the `attw` job
151151 run : yarn test -n FalseCJS
Original file line number Diff line number Diff line change 1515 ],
1616 "author" : " Dan Abramov <dan.abramov@me.com>" ,
1717 "main" : " dist/cjs/redux-thunk.cjs" ,
18- "module" : " dist/redux-thunk.mjs " ,
18+ "module" : " dist/redux-thunk.legacy-esm.js " ,
1919 "types" : " dist/redux-thunk.d.ts" ,
2020 "exports" : {
2121 "./package.json" : " ./package.json" ,
Original file line number Diff line number Diff line change 11import { defineConfig , Options } from 'tsup'
2+ import fs from 'fs'
23
34export default defineConfig ( options => {
45 const commonOptions : Partial < Options > = {
@@ -14,7 +15,14 @@ export default defineConfig(options => {
1415 format : [ 'esm' ] ,
1516 outExtension : ( ) => ( { js : '.mjs' } ) ,
1617 dts : true ,
17- clean : true
18+ clean : true ,
19+ onSuccess ( ) {
20+ // Support Webpack 4 by pointing `"module"` to a file with a `.js` extension
21+ fs . copyFileSync (
22+ 'dist/redux-thunk.mjs' ,
23+ 'dist/redux-thunk.legacy-esm.js'
24+ )
25+ }
1826 } ,
1927 {
2028 ...commonOptions ,
You can’t perform that action at this time.
0 commit comments