vue.config.js 639 B

1234567891011121314151617181920212223242526
  1. const { defineConfig } = require('@vue/cli-service')
  2. const proxy = require('./config/dev-proxy')
  3. module.exports = defineConfig({
  4. transpileDependencies: true,
  5. outputDir: '../../dist/page_workDesktop',
  6. publicPath: process.env.VUE_APP_BASE_PUBLIC,
  7. productionSourceMap: false,
  8. devServer: {
  9. historyApiFallback: true,
  10. allowedHosts: 'all',
  11. headers: {
  12. 'Access-Control-Allow-Origin': '*'
  13. },
  14. proxy: proxy
  15. },
  16. chainWebpack: config => {
  17. config.plugin('html').tap(args => {
  18. // html中添加资源版本后缀
  19. args[0].assets = {
  20. version: Date.now()
  21. }
  22. return args
  23. })
  24. }
  25. })