123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- const path = require('path');
- module.exports = {
- publicPath: process.env.NODE_ENV === 'development' ? './' : process.env.VUE_APP_ROUTER,
- pages: {
- index: 'src/pages/index/main.js',
- jobfairList: 'src/pages/jobfairList/main.js',
- jobinfoList: 'src/pages/jobinfoList/main.js',
- jobsList: 'src/pages/jobsList/main.js',
- talkList: 'src/pages/talkList/main.js',
- jobfair: 'src/pages/jobfair/main.js',
- jobinfo: 'src/pages/jobinfo/main.js',
- jobs: 'src/pages/jobs/main.js',
- talk: 'src/pages/talk/main.js',
- student: 'src/pages/student/main.js',
- corp: 'src/pages/corp/main.js',
- news: 'src/pages/news/main.js',
- register: 'src/pages/register/main.js',
- newsList: 'src/pages/newsList/main.js',
- },
- configureWebpack: config => {
- Object.assign(config, {
- // 开发生产共同配置
- resolve: {
- alias: {
- '@': path.resolve(__dirname, './src'),
- '@c': path.resolve(__dirname, './src/components'),
- '@a': path.resolve(__dirname, './src/assets'),
- },
- },
- });
- },
- // css: {
- // loaderOptions: {
- // css: {
- // data: `@import "./src/style/nutui.css";@import "@nutui/nutui/dist/styles/index.css";`,
- // },
- // },
- // },
- devServer: {
- port: '8005',
- //api地址前缀
- proxy: {
- '/api': {
- target: 'http://smart.cc-lotus.info',
- ws: true,
- onProxyReq(proxyReq, req, res) {
- proxyReq.setHeader('x-tenant', 'master');
- },
- },
- '/wxtoken': {
- target: 'http://smart.cc-lotus.info/weixin',
- changeOrigin: true,
- ws: true,
- pathRewrite: {
- '^/wxtoken': 'http://localhost:8104',
- },
- },
- '/files': {
- target: 'http://smart.cc-lotus.info',
- changeOrigin: true,
- ws: true,
- },
- },
- },
- };
|