I am encountering an issue when running npm run build as it generates a series of errors, whereas npm run dev runs smoothly without any errors.
I have attempted to resolve this by modifying the public path in webpack.config.js to ./dist, but unfortunately, this did not solve the problem. I also tried installing uglifyjs, but it did not provide a solution either. At this point, I am unsure of what else to try.
Below is my webpack.config.js file:
var path = require('path')
var webpack = require('webpack')
const VueLoaderPlugin = require('vue-loader/lib/plugin')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
module.exports = {
// webpack configuration here
}
And here is my package.json file:
{
"scripts": {
// npm scripts here
},
"dependencies": {
// dependencies here
},
// devDependencies and browserslist here
}
Upon running npm run build, the expectation is to have a dist folder with all necessary files to operate in production mode. Instead, I am encountering the following errors:
// Error log excerpt here