Skip to content

A mdpack plugin use babel to transform mdpack-exec code to es5.

License

Notifications You must be signed in to change notification settings

PengJiyuan/mdpack-plugin-babel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mdpack-plugin-babel

A mdpack plugin for transform mdpack-exec code to es5.

Usage

npm i mdpack-plugin-babel -D

Please make sure @babel/core, @babel/preset-env in you node_modules.

// mdpack.config.js
const MdpackPluginBabel = require('mdpack-plugin-babel');
module.exports = {
  entry: 'index.md',
  output: {
    path: 'dist',
    name: 'mybundle'
  },
  format: ['html'],
  plugins: [
    new MdpackPluginBabel({
      babelrc: false,
      presets: ["@babel/preset-env"]
    });
  ]
}

Support .babelrc also:

// .babelrc
{
  presets: ["@babel/preset-env"]
}

LICENSE

MIT © PengJiyuan

About

A mdpack plugin use babel to transform mdpack-exec code to es5.

Resources

License

Stars

Watchers

Forks

Packages

No packages published