vue.config.js 621 B

1234567891011121314151617181920212223242526272829303132333435
  1. const path = require('path')
  2. function resolve(dir) {
  3. return path.join(__dirname, dir)
  4. }
  5. const proxy_port = 8000
  6. module.exports = {
  7. devServer: {
  8. proxy: {
  9. [process.env.VUE_APP_BASE_API]: {
  10. target: `http://localhost:${proxy_port}`,
  11. changeOrigin: true
  12. }
  13. }
  14. },
  15. transpileDependencies: ['vuetify'],
  16. pluginOptions: {
  17. i18n: {
  18. locale: 'en',
  19. fallbackLocale: 'en',
  20. localeDir: 'locales',
  21. enableInSFC: false
  22. }
  23. },
  24. chainWebpack: (config) => {
  25. config.resolve.alias
  26. .set('@$', resolve('src'))
  27. .set('@views', resolve('src/views'))
  28. }
  29. }