inula/packages/create-inula/lib/generators/InulaJS-antd/templates/webpack/babel.config.js

20 lines
499 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// babelrc 只会影响本项目中的代码
// babel.config.js会影响整个项目中的代码包含node_modules中的代码
// 推荐使用babel.config.js
module.exports = {
plugins: [
'@babel/plugin-proposal-class-properties',
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-proposal-export-default-from',
],
presets: [
[
'@babel/preset-react',
{
runtime: 'automatic', // 新增
importSource: 'inula', // 新增
},
],
],
};