File tree Expand file tree Collapse file tree 5 files changed +46
-10
lines changed
Expand file tree Collapse file tree 5 files changed +46
-10
lines changed Original file line number Diff line number Diff line change 1212 - name : Setup Node
1313 uses : actions/setup-node@v1
1414 with :
15- node-version : ' 14 .x'
15+ node-version : ' 18 .x'
1616
1717 - name : Get yarn cache
1818 id : yarn-cache
2626 restore-keys : |
2727 ${{ runner.os }}-yarn-
2828
29- - run : yarn install --frozen-lockfile
29+ - run : yarn install --frozen-lockfile --ignore-engines
3030 - run : yarn build
3131 - run : yarn build:playground
3232
Original file line number Diff line number Diff line change 77 runs-on : ${{ matrix.os }}
88 strategy :
99 matrix :
10- node : ['14 .x', '16 .x']
10+ node : ['16 .x', '18 .x']
1111 os : [ubuntu-20.04]
1212
1313 steps :
2121
2222 - name : Install deps and build (with cache)
2323 uses : bahmutov/npm-install@v1
24+ with :
25+ install-command : yarn install --ignore-engines
2426
2527 - name : Lint
2628 run : yarn lint
Original file line number Diff line number Diff line change 66 env :
77 CI_JOB_NUMBER : 1
88 steps :
9- - uses : actions/checkout@v1
10- - uses : andresz1/size-limit-action@v1
9+ - name : Checkout repo
10+ uses : actions/checkout@v2
11+
12+ - name : Setup Node
13+ uses : actions/setup-node@v1
1114 with :
12- github_token : ${{ secrets.GITHUB_TOKEN }}
15+ node-version : ' 18.x'
16+
17+ - name : Install deps and build (with cache)
18+ uses : bahmutov/npm-install@v1
19+ with :
20+ install-command : yarn install --ignore-engines
21+
22+ - uses : preactjs/compressed-size-action@v2
23+ with :
24+ repo-token : ' ${{ secrets.GITHUB_TOKEN }}'
25+ pattern : " **/dist/**/*.?(m)js"
Original file line number Diff line number Diff line change 33 "author" :
" devrnt <[email protected] >" ,
44 "description" : " React wizard (stepper) builder without the hassle, powered by hooks." ,
55 "homepage" : " https://github.com/devrnt/react-use-wizard#readme" ,
6- "module" : " dist/react-use-wizard.esm.js " ,
6+ "module" : " dist/react-use-wizard.mjs " ,
77 "version" : " 2.2.1" ,
88 "license" : " MIT" ,
99 "main" : " dist/index.js" ,
10- "typings " : " dist/index.d.ts" ,
10+ "types " : " dist/index.d.ts" ,
1111 "sideEffects" : false ,
1212 "repository" : {
1313 "type" : " git" ,
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