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 '
33
44export default defineConfig ( options => {
55 const commonOptions : Partial < Options > = {
@@ -16,13 +16,15 @@ export default defineConfig(options => {
1616 outExtension : ( ) => ( { js : '.mjs' } ) ,
1717 dts : true ,
1818 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' } ,
2628 } ,
2729 {
2830 ...commonOptions ,
You can’t perform that action at this time.
0 commit comments