1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- const { resolve } = require('path')
- const { VantResolver } = require('unplugin-vue-components/resolvers')
- const ComponentsPlugin = require('unplugin-vue-components/webpack')
- module.exports = {
- publicPath: '/app_web', // 打包后资源访问路径
- lintOnSave: false, // eslint是否在保存的时候检查
- pages: {
- index: {
- entry: 'src/main.ts', // page 的入口
- template: 'public/index.html', // 模板来源
- filename: 'index.html' // 在 dist/index.html 的输出
- },
- demo: {
- entry: 'src/pages/demo/main.ts',
- template: 'src/pages/demo/public/index.html',
- filename: 'demo.html'
- },
- LearnPlan: {
- entry: 'src/pages/LearnPlan/main.ts',
- template: 'src/pages/LearnPlan/public/index.html',
- filename: 'learn-plan.html'
- },
- SectionAudition: {
- entry: 'src/pages/SectionAudition/main.ts',
- template: 'src/pages/SectionAudition/public/index.html',
- filename: 'section-audition.html'
- },
- DownloadApp: {
- entry: 'src/pages/DownloadApp/main.ts',
- template: 'src/pages/DownloadApp/public/index.html',
- filename: 'download-app.html'
- },
- DownloadAppParent: {
- entry: 'src/pages/DownloadAppParent/main.ts',
- template: 'src/pages/DownloadAppParent/public/index.html',
- filename: 'download-app-parent.html'
- },
- Course: {
- entry: 'src/pages/Course/main.ts',
- template: 'src/pages/Course/public/index.html',
- filename: 'course.html'
- },
- LP: {
- entry: 'src/pages/LearnPlanActive/main.ts',
- template: 'src/pages/LearnPlanActive/public/index.html',
- filename: 'lp.html'
- },
- pay: {
- entry: 'src/pages/Pay/main.ts',
- template: 'src/pages/Pay/public/index.html',
- filename: 'pay.html'
- },
- pay: {
- entry: 'src/pages/CollectCourses/main.ts',
- template: 'src/pages/CollectCourses/public/index.html',
- filename: 'collect-courses.html'
- },
- },
- chainWebpack: config => {
- config.resolve.alias
- .set('@', resolve('src'))
- .set('@hook', resolve('src/hook'))
- .set('@demo', resolve('src/pages/demo/src'))
- .set('@LP', resolve('src/pages/LearnPlan'))
- },
- configureWebpack: {
- plugins: [
- ComponentsPlugin({
- resolvers: [VantResolver()]
- })
- ]
- },
- devServer: {
- proxy: {
- '/api/': {
- target: 'http://local.luojigou.vip:8888/',
- ws: false,
- secure: false,
- changeOrigin: true,
- pathRewrite: {
- '^/api/': ''
- }
- },
- '/zd-api/': {
- // target: 'https://open.test.luojigou.vip/', // 开发环境
- // target: 'https://open.api.luojigou.vip/', // 生产环境
- target: 'http://192.168.1.105:8083/', // 生产环境
- ws: false,
- secure: false,
- changeOrigin: true,
- pathRewrite: {
- '^/zd-api/': ''
- }
- }
- }
- }
- }
|