vue兼容ie


為了兼容IE github

build/webpack.base.conf.js

[vuex] vuex requires a Promise polyfill in this browser.

// app為 string,一直報錯,之后改為函數便可以了 
entry: () =>{
  return { app: ['babel-polyfill', './src/main.js'] }
}
/* 還需要在main.js中引入 */
import 'babel-polyfill'
其他的引入方式,都可以進行測試一下
// ----
entry: {
  'babel-polyfill': 'babel-polyfill',
  app: './src/main.js'
},
// ------------
entry: {
  app: [
    'babel-polyfill',
    './src/main.js'
  ]
},

js轉義 需要轉義的第三方庫

{
  test: /\.js$/,
  loader: 'babel-loader',
  include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client'), resolve('node_modules/element-ui-verify/dist')]
},

總結

  • 需要考慮很多,雖然vue是支持ie9,但是引用的庫,並不一定考慮ie9。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



猜您在找 Vue 在ie下的兼容 Vue 兼容ie 使用transpileDependencies vue-cli 在IE下兼容設置 VUE項目兼容IE瀏覽器 Vue直接引用