Explorar el Código

项目添加robots.txt 防止后台管理系统被搜索引擎收录

Live hace 4 años
padre
commit
0c069a57cc
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5 1
      ruoyi-ui/vue.config.js

+ 5 - 1
ruoyi-ui/vue.config.js

@@ -117,7 +117,11 @@ module.exports = {
                 }
               }
             })
-          config.optimization.runtimeChunk('single')
+          config.optimization.runtimeChunk('single'),
+          {
+             from: path.resolve(__dirname, './public/robots.txt'),//防爬虫文件
+             to:'./',//到根目录下
+          }
         }
       )
   }