@mnrendra/rollup-plugin-dts
v1.0.0
Published
A "rollup-plugin-dts" with dual exports, allowing consumers to `import` or `require` it without needing to access the `.default` export in both CommonJS and ES Module formats.
Maintainers
Readme
@mnrendra/rollup-plugin-dts
A rollup-plugin-dts with dual exports, allowing consumers to import or require it without needing to access the .default export in both CommonJS and ES Module formats.
This 🍣 Rollup plugin is only linked to rollup-plugin-dts version ^6.1.1, so it doesn’t modify any original code except for how it is exported and packaged.
Thank you to @Swatinem for creating rollup-plugin-dts.
Install
npm i -D @mnrendra/rollup-plugin-dtsUsage
For ES modules (rollup.config.mjs):
import dts from '@mnrendra/rollup-plugin-dts'
export default {
// ... any Rollup options
plugins: dts({
// rollup-plugin-dts's options
})
}For CommonJS (rollup.config.js):
const dts = require('@mnrendra/rollup-plugin-dts')
module.exports = {
// ... any Rollup options
plugins: dts({
// rollup-plugin-dts's options
})
}Contribute
Contributions are always welcome! Feel free to start a discussion here. Or, if you find any issues with this package, please open an issue here.
