vue.config.js 761 B

12345678910111213141516171819202122232425262728293031
  1. const path = require('path');
  2. const frameSrc = path.resolve(__dirname, '../admin-frame');
  3. const packageName = require('./package.json').name;
  4. module.exports = {
  5. devServer: {
  6. port: 3006,
  7. headers: {
  8. 'Access-Control-Allow-Origin': '*'
  9. },
  10. proxy: {
  11. '/api/': {
  12. target: 'http://192.168.0.45:18090'
  13. // target: 'http://127.0.0.1:18090'
  14. }
  15. }
  16. },
  17. configureWebpack: {
  18. output: {
  19. library: `${packageName}-[name]`,
  20. libraryTarget: 'umd',
  21. jsonpFunction: `webpackJsonp_${packageName}`
  22. },
  23. resolve: {
  24. alias: {
  25. '@components': path.join(frameSrc, '/src/components'),
  26. '@style': path.join(frameSrc, '/style'),
  27. '@lib': path.join(frameSrc, '/lib')
  28. }
  29. }
  30. }
  31. };