邃芒官网(PC) https://www.metavatar.cc
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

65 linhas
1.4 KiB

  1. /*
  2. * @Autor: Chuting
  3. * @Date: 2022-08-08 14:23:52
  4. * @LastEditors: Chuting
  5. * @LastEditTime: 2022-08-10 22:43:41
  6. * @Description:
  7. */
  8. const path = require('path')
  9. function resolve(dir) {
  10. return path.join(__dirname, dir)
  11. }
  12. module.exports = {
  13. css: {
  14. loaderOptions: {
  15. css: {
  16. // options here will be passed to css-loader
  17. },
  18. // postcss: {
  19. // // options here will be passed to postcss-loader
  20. // plugins: [require('postcss-px2rem')({
  21. // remUnit: 75
  22. // })]
  23. // }
  24. }
  25. },
  26. // pwa: {
  27. // iconPaths: {
  28. // favicon32: 'favicon.ico',
  29. // favicon16: 'favicon.ico',
  30. // appleTouchIcon: 'favicon.ico',
  31. // maskIcon: 'favicon.ico',
  32. // msTileImage: 'favicon.ico'
  33. // }
  34. // },
  35. //http://www.metavatar.cc/
  36. devServer: {
  37. overlay: {
  38. warnings: false,
  39. errors: false
  40. },
  41. proxy: {
  42. '/api': {
  43. target: 'http://www.metavatar.cc/api',
  44. changeOrigin: true,
  45. pathRewrite: {
  46. '^/api': ''
  47. },
  48. },
  49. }
  50. },
  51. lintOnSave: false,
  52. publicPath: '/', // 打包后引用的资源路径
  53. configureWebpack: {
  54. resolve: {
  55. alias: {
  56. '@': resolve('src')
  57. }
  58. }
  59. }
  60. }