diff --git a/package.json b/package.json index e96d827d8..0c82411d4 100644 --- a/package.json +++ b/package.json @@ -5,11 +5,9 @@ "author": "CZI ", "homepage": "https://github.com/chanzuckerberg/edu-design-system", "license": "MIT", + "type": "commonjs", "exports": { - ".": { - "import": "./lib/index.js", - "require": "./lib/index.cjs" - }, + ".": "./lib/index.js", "./index.css": "./lib/index.css", "./fonts.css": "./lib/tokens/fonts.css", "./tailwind.config": "./tailwind.config.ts" diff --git a/rollup.config.mjs b/rollup.config.mjs index e17e385ac..17f30ec50 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -7,24 +7,14 @@ import postcss from 'rollup-plugin-postcss'; */ export default { input: 'src/index.ts', - output: [ - { - dir: 'lib', - format: 'es', - preserveModules: true, - preserveModulesRoot: 'src', - sourcemap: true, - }, - { - dir: 'lib', - format: 'cjs', - preserveModules: true, - preserveModulesRoot: 'src', - sourcemap: true, - entryFileNames: '[name].cjs', - interop: 'auto', - }, - ], + output: { + dir: 'lib', + format: 'cjs', + preserveModules: true, + preserveModulesRoot: 'src', + sourcemap: true, + interop: 'auto', + }, /** * With the nodeResolve plugin, this marks all EDS node_modules as external, aka provided by the consumer. * Since EDS is not imported directly into a web