Answer the question
In order to leave comments, you need to log in
Why doesn't publicpath change in vue?
PublicPath doesn't work in vue.config.js.
I changed the connection path to /example/, but the output is /#/
Here is the code:
const path = require('path')
const path = require('path')
module.exports = {
publicPath: process.env.NODE_ENV === 'production'
? '/example/'
: '/',
configureWebpack: {
resolve: {
alias: {
'vue$': path.resolve('./node_modules/vue/dist/vue.common.js'),
}
}
}
}
Answer the question
In order to leave comments, you need to log in
so that there is no /#/, you need to write mode: history in your router. the publicPath variable is responsible for the application publishing address.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question