Gathering detailed insights and metrics for @mdx-js/rollup
Gathering detailed insights and metrics for @mdx-js/rollup
npm install @mdx-js/rollup
Typescript
Module System
Node Version
NPM Version
83.3
Supply Chain
98.9
Quality
81.4
Maintenance
100
Vulnerability
99.6
License
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
4,144,899
Last Day
11,866
Last Week
57,986
Last Month
255,204
Last Year
2,515,310
MIT License
18,087 Stars
1,752 Commits
1,147 Forks
88 Watchers
6 Branches
190 Contributors
Updated on Feb 20, 2025
Latest Version
3.1.0
Package Id
@mdx-js/rollup@3.1.0
Unpacked Size
13.78 kB
Size
5.17 kB
File Count
9
NPM Version
10.9.0
Node Version
23.0.0
Published on
Oct 18, 2024
Cumulative downloads
Total Downloads
Last Day
-6.7%
11,866
Compared to previous day
Last Week
-6.6%
57,986
Compared to previous week
Last Month
42.1%
255,204
Compared to previous month
Last Year
115.8%
2,515,310
Compared to previous year
4
1
@mdx-js/rollup
Rollup (and Vite) plugin for MDX.
This package is a Rollup (and Vite) plugin to support MDX.
This integration is useful if you’re using Rollup (or another tool that uses Rollup, such as Vite).
This integration can be combined with the Babel plugin to compile modern JavaScript features to ones your users support.
If you want to evaluate MDX code then the lower-level compiler (@mdx-js/mdx
)
can be used manually.
This package is ESM only. In Node.js (version 16+), install with npm:
1npm install @mdx-js/rollup
Add something along these lines to your rollup.config.js
:
1/** 2 * @import {RollupOptions} from 'rollup' 3 */ 4 5import mdx from '@mdx-js/rollup' 6 7/** @type {RollupOptions} */ 8const config = { 9 // … 10 plugins: [ 11 // … 12 mdx({/* jsxImportSource: …, otherOptions… */}) 13 ] 14} 15 16export default config
See also ¶ Vite if you’re using Rollup through them for more info.
This package exports no identifiers.
The default export is mdx
.
mdx(options?)
Plugin to compile MDX w/ rollup.
options
(Options
, optional)
— configurationRollup (and Vite) plugin.
Options
Configuration (TypeScript type).
Options are the same as CompileOptions
from @mdx-js/mdx
with the exception that the SourceMapGenerator
option is supported based on
how you configure Rollup.
You cannot pass it manually.
When using Vite, the development
option is also supported based on how you
configure Vite.
There are also two additional options:
exclude
(Array<RegExp | string>
, RegExp
, or string
, optional)
— picomatch patterns to excludeinclude
(Array<RegExp | string>
, RegExp
, or string
, optional)
— picomatch patterns to includeIf you use modern JavaScript features you might want to use Babel through
@rollup/plugin-babel
to compile to code that works:
1/** 2 * @import {RollupOptions} from 'rollup' 3 */ 4 5import mdx from '@mdx-js/rollup' 6import {babel} from '@rollup/plugin-babel' 7 8/** @type {RollupOptions} */ 9const config = { 10 // … 11 plugins: [ 12 // … 13 mdx({/* jsxImportSource: …, otherOptions… */}), 14 babel({ 15 // Also run on what used to be `.mdx` (but is now JS): 16 extensions: ['.js', '.jsx', '.cjs', '.mjs', '.md', '.mdx'] 17 // Other options… 18 }) 19 ] 20} 21 22export default config
This package is fully typed with TypeScript.
It exports the additional type Options
.
See § Types on our website for information.
Projects maintained by the unified collective are compatible with maintained versions of Node.js.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line, @mdx-js/rollup@^3
,
compatible with Node.js 16.
See § Security on our website for information.
See § Contribute on our website for ways to get started. See § Support for ways to get help.
This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.
No vulnerabilities found.
Reason
7 commit(s) and 11 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
1 existing vulnerabilities detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 4
Details
Reason
Found 0/28 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-02-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More