vue.config.js 704 B

123456789101112131415161718192021222324252627282930313233343536
  1. const path = require('path');
  2. const frameSrc = path.resolve(__dirname, '../admin-frame');
  3. module.exports = {
  4. // baseUrl: './',
  5. publicPath: process.env.VUE_APP_ROOT_URL + 'xms',
  6. css: {
  7. extract: true,
  8. },
  9. productionSourceMap: false,
  10. configureWebpack: {
  11. externals: {
  12. vue: 'Vue',
  13. },
  14. resolve: {
  15. alias: {
  16. '@frame': frameSrc,
  17. '@naf': path.join(frameSrc, '/naf'),
  18. '@lib': path.join(frameSrc, '/lib'),
  19. },
  20. },
  21. },
  22. devServer: {
  23. port: 3002,
  24. before(app) {
  25. app.use((req, res, next) => {
  26. // eslint-disable-next-line no-console
  27. console.log(`[${req.method}]`, req.path);
  28. next();
  29. });
  30. },
  31. },
  32. };