vue.config.js 671 B

123456789101112131415161718192021222324252627282930313233
  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 + 'gaf',
  6. productionSourceMap: false,
  7. configureWebpack: {
  8. externals: {
  9. vue: 'Vue',
  10. },
  11. resolve: {
  12. alias: {
  13. '@frame': frameSrc,
  14. '@naf': path.join(frameSrc, '/naf'),
  15. '@lib': path.join(frameSrc, '/lib'),
  16. },
  17. },
  18. },
  19. devServer: {
  20. port: 3001,
  21. before(app) {
  22. app.use((req, res, next) => {
  23. // eslint-disable-next-line no-console
  24. console.log(`[${req.method}]`, req.path);
  25. next();
  26. });
  27. },
  28. },
  29. };