File tree 3 files changed +11
-3
lines changed
3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ jobs:
145
145
run : yarn test
146
146
if : matrix.example != 'are-the-types-wrong'
147
147
148
- - name : Run test step
148
+ - name : Run test step (attw)
149
149
working-directory : ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
150
150
# Ignore "FalseCJS" errors in the `attw` job
151
151
run : yarn test -n FalseCJS
Original file line number Diff line number Diff line change 15
15
],
16
16
"author" : " Dan Abramov <dan.abramov@me.com>" ,
17
17
"main" : " dist/cjs/redux-thunk.cjs" ,
18
- "module" : " dist/redux-thunk.mjs " ,
18
+ "module" : " dist/redux-thunk.legacy-esm.js " ,
19
19
"types" : " dist/redux-thunk.d.ts" ,
20
20
"exports" : {
21
21
"./package.json" : " ./package.json" ,
Original file line number Diff line number Diff line change 1
1
import { defineConfig , Options } from 'tsup'
2
+ import fs from 'fs'
2
3
3
4
export default defineConfig ( options => {
4
5
const commonOptions : Partial < Options > = {
@@ -14,7 +15,14 @@ export default defineConfig(options => {
14
15
format : [ 'esm' ] ,
15
16
outExtension : ( ) => ( { js : '.mjs' } ) ,
16
17
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
+ }
18
26
} ,
19
27
{
20
28
...commonOptions ,
You can’t perform that action at this time.
0 commit comments