rewrite assets publicPath in production env
vue cli
vue add publicpath
yarn
yarn add vue-cli-plugin-publicpath --dev
npm
npm i vue-cli-plugin-publicpath --save-dev
vue.config.js
module.exports = {
baseUrl: '//js.cdn.com', // js publicPath
pluginOptions: {
publicPath: {
css: '',
images: '',
svg: '',
media: '',
fonts: ''
}
}
}
See this file for config options.