File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed
Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 2525 },
2626 "exports" : {
2727 "." : {
28- "browser" : " ./dist/react-use-wizard.esm.js " ,
29- "import" : " ./dist/react-use-wizard.esm.js " ,
28+ "browser" : " ./dist/react-use-wizard.mjs " ,
29+ "import" : " ./dist/react-use-wizard.mjs " ,
3030 "require" : " ./dist/index.js"
3131 }
3232 },
Original file line number Diff line number Diff line change 1+ const path = require ( 'node:path' ) ;
2+
3+ // Not transpiled with TypeScript or Babel, so use plain Es6/Node.js!
4+ module . exports = {
5+ // This function will run for each entry/format/env combination
6+ rollup ( config , options ) {
7+ if ( options . format === 'esm' ) {
8+ const outputFile = path . join ( __dirname , 'dist' , `${ options . name } .mjs` ) ;
9+
10+ return {
11+ ...config ,
12+ output : {
13+ ...config . output ,
14+ file : outputFile ,
15+ } ,
16+ } ;
17+ }
18+
19+ return config ;
20+ } ,
21+ } ;
You can’t perform that action at this time.
0 commit comments