Gathering detailed insights and metrics for @mdx-js/rollup
Gathering detailed insights and metrics for @mdx-js/rollup
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
50.6
Supply Chain
97.4
Quality
82.1
Maintenance
100
Vulnerability
99.6
License
JavaScript (100%)
Total Downloads
3,718,837
Last Day
6,730
Last Week
47,819
Last Month
213,037
Last Year
2,328,147
17,874 Stars
1,743 Commits
1,138 Forks
88 Watching
10 Branches
193 Contributors
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
Publised On
18 Oct 2024
Cumulative downloads
Total Downloads
Last day
-33.9%
6,730
Compared to previous day
Last week
-11.1%
47,819
Compared to previous week
Last month
-1.5%
213,037
Compared to previous month
Last year
113%
2,328,147
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
16 commit(s) and 16 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
2 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 2024-12-16
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