main.js 683 B

12345678910111213141516171819202122232425262728293031
  1. const config = require('../base/base');
  2. const utils = require('../base/utils');
  3. const nycConfig = require('../../nyc.config');
  4. module.exports = {
  5. ...config,
  6. "stories": [
  7. '../../packages/semi-ui/**/_story/*.stories.(js|jsx)',
  8. ],
  9. typescript: {
  10. check: false,
  11. checkOptions: {}
  12. },
  13. babel: (options) => {
  14. const istanbulPluginOption = [
  15. 'babel-plugin-istanbul',
  16. {
  17. "include": nycConfig.include,
  18. "exclude": nycConfig.exclude
  19. }
  20. ];
  21. // 如果是测试环境,则插入 istanbul babel 插件
  22. if (utils.isTest()) {
  23. options.plugins.unshift(istanbulPluginOption);
  24. }
  25. return ({
  26. ...options,
  27. })
  28. },
  29. };