vue.config.js 644 B

12345678910111213141516171819202122232425
  1. const path = require("path");
  2. // const webpack = require("webpack");
  3. function resolve(dir) {
  4. return path.join(__dirname, dir);
  5. }
  6. const port = 8080;
  7. module.exports = {
  8. lintOnSave: process.env.NODE_ENV === "producut",
  9. css: {
  10. loaderOptions: {
  11. less: {
  12. modifyVars: {
  13. // red: "#03a9f4",
  14. // blue: "#3eaf7c",
  15. // orange: "#f08d49",
  16. // "text-color": "#111",
  17. // "active-color": "#B4E7A0",
  18. // 或者可以通过 less 文件覆盖(文件路径为绝对路径)
  19. hack: `true; @import "${resolve("./src/style/modifyVars.less")}";`
  20. }
  21. }
  22. }
  23. }
  24. };