0👍
✅
I found out the problem.
Project structure:
- src
- main.js
- ...
- package.json
- vue.config.js
I was launching build command from inside src directory, so vue.config.js was not considered.
However the correct solution for me was:
const DEV_MODE = process.env.NODE_ENV !== "production";
module.exports = {
configureWebpack: {
output: {
publicPath: DEV_MODE ? '' : '/ui/'
}
}
}
Source:stackexchange.com