How to make a vuejs application work with IE 11 when using feathersjs

房东的猫 提交于 2019-12-06 17:52:29

I believe the process should be the same as following the directions on the Vuetify website in the section of this page titled "IE11 & Safari 9 support" (scroll to the bottom): https://vuetifyjs.com/en/getting-started/quick-start

I've not had to do anything else in my projects, that I can remember.

I finally manage to solve this issue.

This is the babel.config.js config that does the trick:

module.exports = {
  presets: ['@vue/app'],
  plugins: ['@babel/transform-modules-commonjs']
}

Also there was a typo in my vue.config.js it should look like this:

// vue.config.js
module.exports = {
  baseUrl: '/',
  transpileDependencies: [
    '@feathersjs',
    'debug'
  ]
}

Finally, when using feathers this line wouldn't work:

.configure(restClient.fetch(window.fetch))

so you can use import 'whatwg-fetch' to solve it (remember to install it npm i whatwg-fetch)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!