vue 打包配置

vue 打包配置

const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  publicPath : './',//打包后的  ,注意是否要设置 <base href="./">
  outputDir : '../../public/snap',
  chainWebpack: config => {
    config.plugin('html').tap(args => {
      args[0].title = 'html的title';
      return args;
    });
  }, 

})

留下回复


Warning: is_dir(): open_basedir restriction in effect. File(/www/wwwroot/my-wordpress/index.php/2024/05/06/vue-%E6%89%93%E5%8C%85%E9%85%8D%E7%BD%AE/) is not within the allowed path(s): (/www/wwwroot/my-wordpress/:/tmp/) in /www/wwwroot/my-wordpress/wp-content/plugins/matomo/classes/WpMatomo/AIBotTracking.php on line 175