Lately, I've been encountering a strange issue in Vue.js. Here's the thing: my application runs smoothly on all browsers locally (yes, even IE 11). But when I compile it using npm run build
and deploy it to my server (which essentially serves content from an S3 bucket through a CDN), I encounter an error message on my chunk-vendors.js
. Strange, right? I've already got polyfills set up that work perfectly fine locally. So why this discrepancy once the code is compiled and minified?
The initial fix for this problem seemed to be adding
transpileDependencies: ['vuex-persist'],
in my vue.config.release
file. However, there are so many suggestions online that I can't seem to figure out what might actually solve the issue.
https://i.sstatic.net/ZU8Gk.png
UPDATE 1: I've also tried usinghttps://babeljs.io/docs/en/babel-plugin-transform-destructuring, but to no avail. It works like a charm on my local setup, but fails once compiled.