File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change 1
- import { defineConfig , Options } from 'tsup'
2
- import fs from 'fs '
1
+ import type { Options } from 'tsup'
2
+ import { defineConfig } from 'tsup '
3
3
4
4
export default defineConfig ( options => {
5
5
const commonOptions : Partial < Options > = {
@@ -16,13 +16,15 @@ export default defineConfig(options => {
16
16
outExtension : ( ) => ( { js : '.mjs' } ) ,
17
17
dts : true ,
18
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
- } ,
19
+ } ,
20
+ // Support Webpack 4 by pointing `"module"` to a file with a `.js` extension
21
+ {
22
+ ...commonOptions ,
23
+ format : [ 'esm' ] ,
24
+ target : 'es2017' ,
25
+ dts : false ,
26
+ outExtension : ( ) => ( { js : '.js' } ) ,
27
+ entry : { 'redux-thunk.legacy-esm' : 'src/index.ts' } ,
26
28
} ,
27
29
{
28
30
...commonOptions ,
You can’t perform that action at this time.
0 commit comments