My Vue.js Application contains the following code snippet:
(function() {
initApp();
})();
function initApp() {
window.myApp = new Vue({
el: '#wrapper',
data() {
return {
somedata: []
}
}
});
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.16/vue.min.js"></script>
Despite successfully running the application, when I attempt to minify the code, it fails with the error
Error : Unexpected token: punc (()
. This leaves me perplexed as to the reason behind it.