I have been having an odd issue in Vue.js for a bit now, my application works on all browsers in my local (including IE 11). When I compile my application with npm run build
and push it over to my server (which is just a CDN serving content from an S3 bucket) I get this message on my chunk-vendors.js
. I have pollyfills in place that are working on my local, any ideas why it would be different once compiled and minified?
The original problem that seemed to solve this in my local was adding transpileDependencies: ['vuex-persist'],
to my vue.config.release
. There are so many answers online I can't make heads or tails or what could be the problem.
UPDATE 1: Attempted to use https://babeljs.io/docs/en/babel-plugin-transform-destructuring and still no luck. Works on my local but not compiled.
I found the answer after a few days of digging. The issue was with vuex-presist
. I needed to downgrade to version ^1.8.0
.
The reason for this is that the 'newer' version of vuex-presist
uses an underlying npm
package (flatten something or other) that causes this issue.