Sign in

徐烜 / bsth-ebus-h5_editor · Files

GitLab

  • Go to dashboard
  • Project
  • Activity
  • Files
  • Commits
  • Builds 0
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • bsth-ebus-h5_editor
  • front-end
  • h5
  • babel.config.js
  • 电子站牌项目(修改front-end/h5下的文件,适配 android 5.0 的内置游览器兼容性) ...
    3cf20708
    1、修改.browserslistrc文件,添加适配项目
    2、修改babel.config.js,添加polyfills(es6.promise,es6.symbol),注对应的core-js是2.6.5版本(对应的polyfills列表在对应的github项目上)
    3、修改package.json,添加babel-polyfill,es6-promise,url-search-params-polyfill依赖
    4、修改bsth-line-chart.js,低版本游览器的svg某些属性不支持写在css中,需要直接定义成属性,如circle,rect的width,height属性,具体看修正后的注释
    5、修改engine-entry.js,手动导入import url-search-params-polyfill,之后core-js升级后,可以定义在babel.config.js中,具体看注释
    6、修改vue.config.js,添加transpileDependencies,添加@luban-h5/plugin-common-props,resize-detector的依赖,将依赖按照babel.config.js定义的polyfill重新编译
    徐烜 authored
    2021-06-09 10:42:38 +0800  
    Browse Code »
babel.config.js 329 Bytes
Edit Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
module.exports = {
  presets: [
    ['@vue/app', {
      polyfills: [
        'es6.promise',
        'es6.symbol'
      ]
    }]
  ],
  'plugins': [
    '@babel/plugin-proposal-optional-chaining',
    [
      'component',
      {
        'libraryName': 'element-ui',
        'styleLibraryName': 'theme-chalk'
      }
    ]
  ]
}