The Babel plugin of Modern.js Module.
You can add Babel compile by the plugin before module-tools internal building.
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: {},
}),
],
});
Please read the Contributing Guide.
Modern.js is MIT licensed.