ES5 和 ES6 的导入区别
Imports difference between ES5 and ES6
如何在 ES6 中管理它?
const withResponsiveness = require('../helpers/withResponsiveness.js').default;
const ResponsiveLegend = withResponsiveness(Legend);
只需使用import
:
import withResponsiveness from '../helpers/withResponsiveness.js';
const ResponsiveLegend = withResponsiveness(Legend);
如何在 ES6 中管理它?
const withResponsiveness = require('../helpers/withResponsiveness.js').default;
const ResponsiveLegend = withResponsiveness(Legend);
只需使用import
:
import withResponsiveness from '../helpers/withResponsiveness.js';
const ResponsiveLegend = withResponsiveness(Legend);