vue.config.js 844 B

1234567891011121314151617181920212223242526272829303132333435
  1. const {
  2. defineConfig
  3. } = require('@vue/cli-service')
  4. const Timestamp = new Date().getTime();
  5. module.exports = defineConfig({
  6. devServer: {
  7. open: true,
  8. proxy: {
  9. '/api': {
  10. target: 'http://121.40.214.80:81/', // 对应自己的接口
  11. changeOrigin: true,
  12. ws: true,
  13. pathRewrite: {
  14. '^/api': '',
  15. },
  16. },
  17. },
  18. },
  19. configureWebpack: { // webpack 配置
  20. output: { // 输出重构 打包编译后的 文件名称 【模块名称.版本号.时间戳】
  21. filename: `js/[name].${Timestamp}.js`,
  22. chunkFilename: `js/[name].${Timestamp}.js`
  23. }
  24. },
  25. css: {
  26. extract: {
  27. filename: `css/[name].${Timestamp}.css`,
  28. chunkFilename: `css/[name].${Timestamp}.css`
  29. }
  30. },
  31. productionSourceMap: false,
  32. publicPath: './',
  33. transpileDependencies: true
  34. })