I can't load the page in Internet Explorer 11 because it complains about polyfill.
[vuex] vuex requires a Promise polyfill in this browser.
I found this: codedump.io/share/i5XuLpv6j7We/1/polyfill-for-ie
But still have no clue how to include this NPM package npm install --save-dev babel-polyfill
Anyone found a solution?
What's problem with just using <script src=""></script>?
Here is Promise polyfill unpkg.com/bunnyjs@0.14.4/dist/polyfill-promise.mi…
Or you can just import 'bunnyjs/src/polyfills/Promise'; after npm install bunnyjs --save. But I would not recommend including and transpiling your code for every modern browser, only for IE11 you can do a backend user agent string check and add an additional <script> with all polyfills for that browser.
I'm just installing the promise-polyfill as part of my package.json dependencies:
"promise-polyfill": "^6.0.2"And then in my
index.jsWebpack entry, I'm importing it along with all my other imports:import './promise-polyfill' import jquery from 'jquery' import tether from 'tether' import bootstrap from 'bootstrap' import './scss/base.scss'; import { app } from './app' app.$mount('#app')app.js, btw, contains my regular Vue imports:import Vue from 'vue' import { sync } from 'vuex-router-sync' import App from './components/App' import router from './router' import store from './store' sync(store, router) import Meta from 'vue-meta' Vue.use(Meta) const app = new Vue({ router, store, Meta, ...App }) export { app, Meta, router, store }