the local picture Mini Program used at the beginning.
later, in order to reduce the size of the package, you have to put the picture on cdn.
Mini Program is packaged with webpack. If you want to change the path of webpack output publicPath directly, you can quickly solve it.
output: {
path: resolve("dist"),
filename: "[name]",
publicPath: "https://xxxx.com/",
},
but after packaging, it is found that the tabbar image file in Mini Program"s app configuration only supports local images.
this is to manually change the image prefix domain name to local in the packaged app json configuration file.
but I don"t want to change it manually every time.
is there any way for webpack to do it automatically?
or can webpack output publicPath work on files other than app?