[Vuejs]-Vue CLI 3 App: Uncaught SyntaxError on NPM Build

0๐Ÿ‘

โœ…

I eventually figured this out. It turned out to be a web server configuration issue. Nothing to do with babel or the vue-cli template.

In my server.js file I had the following lines to serve my files:

let staticPath = path.posix.join('/en-us/credit-application/v2', 'public');
app.use(staticPath, express.static(path.join(__dirname + '/public')));
app.get('/*', (req, res) => {
    res.sendFile(path.join(__dirname+'/public/index.html'))
});

The first line was causing the error. I changed it to:

let staticPath = path.posix.join('/en-us/credit-application/v2');

Everything works! Many thanks to ippi who got me pointed in the right direction.

๐Ÿ‘คJohn P

Leave a comment