Vue 2.7 compilation error when building application
Hey,
after upgrading Vue from 2.6.14 to 2.7.5 I'm having a problem with build as in the screenshot.

How can I make it working again? I didn't do any code changes except changing Vue version.
What loader... why does it complain.. this is a Webpack issue it seems, not Vue
Closing as OP is non-responsive and the issue is vague and also I don't know Vue
Hmm getting this error on @yaireo/[email protected] with [email protected].
The error is:
ERROR in ./node_modules/@yaireo/tagify/dist/tagify.min.js friendly-errors 22:57:45
Module parse failed: Unexpected token (26:30620) friendly-errors 22:57:45
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
Rolled back to @yaireo/[email protected] and everything seems fine again.
Can you please create a Codesandbox basic example so I could examine?
I have the same issue in a Gulp/Browserify setup, starting with v4.13. All versions below v4.13 don‘t have that issue, so right now I‘m sticking with v4.12.
I‘ll try to provide a minimal example as soon as possible.
@mrcgrtz - Gulp + Vue? Since when does Vue compiles with Gulp?
@yairEO Sorry, I should have been more specific: No, this is not happening in a Vue codebase.
But this might be an issue with some dependency along the way, like Terser, Uglify etc. which both Vue and my setup share. I have a TypeScript module importing Tagify which gets transpiled using Browserify and Gulp.
With v4.13 I get a [SyntaxError]: Unexpected token: punc (.) while parsing file: /some_project/node_modules/@yaireo/tagify/dist/tagify.min.js while with v4.12 everything’s running smooth.
But as I said, I’ll create a minimal example as soon as I have some spare time.
At which point do you get this error? it does not state any line... you can use the unminified version of Tagify and replace your tagify.min.js in node_modules with that, and then you'll see exactly which line is causing it
@yairEO This is the same issue as I had. Babel isn't setup correct to use optional chaining. Which you added in 4.13 it seems?
I don't remember when did I add optional-chaining but your babel setup must be very old if it does not support that, which means you should update it regardless of Tagify, which is only one symptom. I also advise you to install Browserlist and configure it in your package.json file
For the sake of completeness: I could pinpoint my issue with the unexpected token down to the minifier which uses an outdated version of terser that could not handle the optional chaining added to v4.13’s dist files.
I already had the latest version of @babel/preset-env and a sensible .browserslistrc file, so I now use the latest terser directly and everything’s smooth again.
So no issue with this package apparently, sorry for the false alarm.
Maybe this helps other people when searching for this issue.