vue2打包路径配置./

vue2 打包静态资源路径怎么加./

index.html里的js和css需要加./

我在vue.config.js里配置了publicPath

module.exports = {
    publicPath: "./",
};

但打包出来index.html里是src="js/app.9ac64c92.js",虽然变成相对路径了,,但./没有,,有没有办法能强制加上./。因为别的框架嵌入说是需要这个

可以这样设置
publicPath: process.env.NODE_ENV === 'development' ? './' : '././',