Error Invalid options in vue.config.js: "baseUrl" is not allowed to solve the problem

## 报错 Invalid options in vue.config.js: "baseUrl" is not allowed

vue3.0 version of execution npm run buildwill be givenInvalid options in vue.config.js: "baseUrl" is not allowed

This is because vue cli3.3 abolished after baseUrl, you need to use after thispublicPath

### error code:

module.exports ={
   baseUrl: process.env.NODE_ENV === 'production'
   ? './'
   : '/'
}

### after correction:

module.exports ={
   BASE_URL: process.env.NODE_ENV === 'production'
   ? './'
   : '/'
}

Guess you like

Origin www.cnblogs.com/changx/p/12096722.html