@modern-js/plugin-module-babel
TypeScript icon, indicating that this package has built-in type declarations

2.60.1 • Public • Published

@modern-js/plugin-module-babel

The Babel plugin of Modern.js Module.

You can add Babel compile by the plugin before module-tools internal building.

Usage

import { moduleTools, defineConfig } from '@modern-js/module-tools';
import { modulePluginBabel } from '@modern-js/plugin-module-babel';
export default defineConfig({
  plugins: [
    moduleTools(),
    modulePluginBabel({
      internalPresetOptions: {
        // babel-plugin-import options
        import: {},
        // @babel/preset-react options
        react: {},
      },
      // refer: https://babeljs.io/docs/en/options
      babelTransformOptions: {},
    }),
  ],
});

Documentation

Contributing

Please read the Contributing Guide.

License

Modern.js is MIT licensed.

Package Sidebar

Install

npm i @modern-js/plugin-module-babel

Weekly Downloads

811

Version

2.60.1

License

MIT

Unpacked Size

8.84 kB

Total Files

5

Last publish

Collaborators

  • jserfeng
  • jingkai.zhao
  • sanyuan0704
  • derozan
  • xieqixuan.xx
  • shawzhou
  • chenjiahan
  • xuchaobei
  • webinfrabot
  • targeral
  • yimingjfe
  • caohuilin
  • kky_kongjiacong
  • bytednpm