vue.config.js 990 B

12345678910111213141516171819202122232425262728293031
  1. module.exports = {
  2. //Solution For Issue:You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.
  3. //zhengkai.blog.csdn.net
  4. publicPath: './', // 相对路径,file模式和web模式都可以使用
  5. runtimeCompiler: true,
  6. configureWebpack: (config) => {
  7. config["performance"] = {
  8. "maxEntrypointSize": 10000000,
  9. "maxAssetSize": 30000000,
  10. }
  11. },
  12. chainWebpack: config => {
  13. config
  14. .plugin('html')
  15. .tap(args => {
  16. //args[0].title= '' // 设置title
  17. return args
  18. })
  19. },
  20. css: {
  21. loaderOptions: {
  22. less: {
  23. modifyVars: {
  24. //在此处设置,也可以设置直角、边框色、字体大小等
  25. 'primary-color': '#07C160',
  26. },
  27. javascriptEnabled: true
  28. }
  29. }
  30. },
  31. }