Scenes
Depending on the route, multiple front-end vue projects can be configured in one port.
Configuration
- The vue project packaging
isvue.config.js
configured as followsconst isProduction = process.env.NODE_ENV === 'production' module.exports = { .... publicPath: isProduction ? './' : '/', }
- nginx configuration
server { listen 8081; location / { root /opt/dist/vue3-element; index index.html; } location /base { alias /opt/dist/base/; index index.html index.html; } }
- access
http://127.0.0.1:8081/ http://127.0.0.1:8081/base/