Skip to content

Commit

Permalink
chore: added cjs build
Browse files Browse the repository at this point in the history
  • Loading branch information
mohsen-deriv committed Nov 9, 2023
1 parent 987a8ac commit 9a5d612
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,42 @@
},
"./Currencies": {
"import": "./dist/Currencies/index.js",
"require": "./dist/Currencies/index.cjs",
"types": "./dist/Currencies/index.d.ts"
},
"./Flags": {
"import": "./dist/Flags/index.js",
"require": "./dist/Flags/index.cjs",
"types": "./dist/Flags/index.d.ts"
},
"./Illustrative": {
"import": "./dist/Illustrative/index.js",
"require": "./dist/Illustrative/index.cjs",
"types": "./dist/Illustrative/index.d.ts"
},
"./LabelPaired": {
"import": "./dist/LabelPaired/index.js",
"require": "./dist/LabelPaired/index.cjs",
"types": "./dist/LabelPaired/index.d.ts"
},
"./Logo": {
"import": "./dist/Logo/index.js",
"require": "./dist/Logo/index.cjs",
"types": "./dist/Logo/index.d.ts"
},
"./Markets": {
"import": "./dist/Markets/index.js",
"require": "./dist/Markets/index.cjs",
"types": "./dist/Markets/index.d.ts"
},
"./Social": {
"import": "./dist/Social/index.js",
"require": "./dist/Social/index.cjs",
"types": "./dist/Social/index.d.ts"
},
"./Standalone": {
"import": "./dist/Standalone/index.js",
"require": "./dist/Standalone/index.cjs",
"types": "./dist/Standalone/index.d.ts"
}
},
Expand Down
5 changes: 5 additions & 0 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ function component(commonPlugins, folder) {
exports: 'named',
format: 'esm',
},
{
file: `dist/${folder}/index.cjs`,
exports: 'named',
format: 'cjs',
},
],
plugins: [...commonPlugins],
external: [/node_modules/, 'react', 'react-dom', 'react/jsx-runtime'],
Expand Down

0 comments on commit 9a5d612

Please sign in to comment.