@mdx-js/vue-loader

1.6.22 • Public • Published

@mdx-js/vue-loader

Build Status lerna Chat

Transform your MDX files into Vue components.

@mdx-js/vue-loader is a webpack loader for MDX files for Vue.js.

Installation

npm:

npm i @mdx-js/vue-loader

In your webpack config:

// ...
module: {
  rules: [
    // ...
    {
      test: /\.mdx?$/,
      use: ['babel-loader', '@mdx-js/vue-loader']
    }
  ]
}

Usage

In your Markdown file:

<!-- helloworld.md -->

# Hello, Vue!

In your main.js:

import Vue from 'vue'
import HelloWorld from 'helloworld.md'

new Vue({
  el: '#app',
  render: h => h(HelloWorld)
}).$mount()

Contribute

See the Support and Contributing guidelines on the MDX website for ways to (get) help.

This project has a Code of Conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.

License

MIT © Compositor and Vercel

Package Sidebar

Install

npm i @mdx-js/vue-loader

Homepage

mdxjs.com

Weekly Downloads

109

Version

1.6.22

License

MIT

Unpacked Size

4.84 kB

Total Files

4

Last publish

Collaborators

  • remcohaszing
  • johno
  • timneutkens
  • wooorm