Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/reduxjs/redux-thunk into …
Browse files Browse the repository at this point in the history
…migrate-typetests-to-vitest
  • Loading branch information
aryaemami59 committed Mar 22, 2024
2 parents df2cb06 + c403cf7 commit 3882793
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions tsup.config.ts
@@ -1,4 +1,3 @@
import fs from 'node:fs/promises'
import type { Options } from 'tsup'
import { defineConfig } from 'tsup'

Expand All @@ -17,14 +16,16 @@ export default defineConfig(options => {
format: ['esm'],
outExtension: () => ({ js: '.mjs' }),
dts: true,
clean: true,
async onSuccess() {
// Support Webpack 4 by pointing `"module"` to a file with a `.js` extension
await fs.copyFile(
'dist/redux-thunk.mjs',
'dist/redux-thunk.legacy-esm.js'
)
}
clean: true
},
// Support Webpack 4 by pointing `"module"` to a file with a `.js` extension
{
...commonOptions,
format: ['esm'],
target: 'es2017',
dts: false,
outExtension: () => ({ js: '.js' }),
entry: { 'redux-thunk.legacy-esm': 'src/index.ts' }
},
{
...commonOptions,
Expand Down

0 comments on commit 3882793

Please sign in to comment.