Gathering detailed insights and metrics for @mdx-js/loader
Gathering detailed insights and metrics for @mdx-js/loader
Gathering detailed insights and metrics for @mdx-js/loader
Gathering detailed insights and metrics for @mdx-js/loader
npm install @mdx-js/loader
Typescript
Module System
Node Version
NPM Version
50.7
Supply Chain
65.6
Quality
81.4
Maintenance
100
Vulnerability
99.6
License
JavaScript (100%)
Total Downloads
272,876,661
Last Day
22,849
Last Week
355,685
Last Month
2,249,834
Last Year
31,067,538
17,877 Stars
1,743 Commits
1,138 Forks
88 Watching
10 Branches
193 Contributors
Latest Version
3.1.0
Package Id
@mdx-js/loader@3.1.0
Unpacked Size
14.73 kB
Size
5.66 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
-80.2%
22,849
Compared to previous day
Last week
-37.6%
355,685
Compared to previous week
Last month
-11.9%
2,249,834
Compared to previous month
Last year
-19.3%
31,067,538
Compared to previous year
2
1
@mdx-js/loader
webpack loader for MDX.
This package is a webpack loader to support MDX.
This integration is useful if you’re using webpack (or another tool that uses webpack, such as Next.js or Rspack).
This integration can be combined with the Babel loader 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/loader
Add something along these lines to your webpack.config.js
:
1/** 2 * @import {Options} from '@mdx-js/loader' 3 * @import {Configuration} from 'webpack' 4 */ 5 6/** @type {Configuration} */ 7const webpackConfig = { 8 module: { 9 // … 10 rules: [ 11 // … 12 { 13 test: /\.mdx?$/, 14 use: [ 15 { 16 loader: '@mdx-js/loader', 17 /** @type {Options} */ 18 options: {/* jsxImportSource: …, otherOptions… */} 19 } 20 ] 21 } 22 ] 23 } 24} 25 26export default webpackConfig
See also ¶ Next.js and ¶ Vue CLI, if you’re using webpack through them, for more info.
This package exports no identifiers.
The default export is mdx
.
mdx
This package exports a webpack plugin as the default export.
Configuration (see Options
) are passed separately through
webpack.
Options
Configuration (TypeScript type).
Options are the same as CompileOptions
from @mdx-js/mdx
with the exception that the SourceMapGenerator
and development
options are
supported based on how you configure webpack.
You cannot pass them manually.
If you use modern JavaScript features you might want to use Babel through
babel-loader
to compile to code that works in older browsers:
1/** 2 * @import {Options} from '@mdx-js/loader' 3 * @import {Configuration} from 'webpack' 4 */ 5 6/** @type {Configuration} */ 7const webpackConfig = { 8 module: { 9 // … 10 rules: [ 11 // … 12 { 13 test: /\.mdx?$/, 14 use: [ 15 // Note that Webpack runs right-to-left: `@mdx-js/loader` is used first, then 16 // `babel-loader`. 17 {loader: 'babel-loader', options: {}}, 18 { 19 loader: '@mdx-js/loader', 20 /** @type {Options} */ 21 options: {} 22 } 23 ] 24 } 25 ] 26 } 27} 28 29export default webpackConfig
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/loader@^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