@constgen/neutrino-mdx-loader

1.9.2 • Public • Published

@constgen/neutrino-mdx-loader

npm npm

Neutrino middleware for MDX files in React apps

Requirements

  • Node.js v10+
  • Neutrino v9
  • React
  • Webpack v4

Installation

@constgen/neutrino-mdx-loader can be installed from NPM. You should install it to "dependencies" (--save) or "devDependncies" (--save-dev) depending on your goal.

npm install --save @constgen/neutrino-mdx-loader

Usage

In preset

Require this package and plug it into Neutrino. The middleware has no options:

let mdxLoader = require('@constgen/neutrino-mdx-loader')

neutrino.use(mdxLoader())

In neutrinorc

The middleware also may be used together with another presets in Neutrino rc-file, e.g.:

.neutrinorc.js

let mdxLoader = require('@constgen/neutrino-mdx-loader')

module.exports = {
   use: [
      mdxLoader()
   ]
}

Syntax Highlighting

If you'd like to add styles for the syntax highlighting, include a Prism.js stylesheet somewhere within your application:

import 'prismjs/themes/prism-tomorrow.css'

Package Sidebar

Install

npm i @constgen/neutrino-mdx-loader

Weekly Downloads

1

Version

1.9.2

License

GPL-3.0

Unpacked Size

38.3 kB

Total Files

4

Last publish

Collaborators

  • constgen