123456789101112131415161718192021222324252627282930 |
- const {
- defineConfig
- } = require('@vue/cli-service')
- module.exports = defineConfig({
- transpileDependencies: true
- })
- module.exports = {
- devServer: {
- proxy: {
- '/api': {
- // target: 'http://127.0.0.1:9527', // 设置你的后端 API 地址
- target: 'http://127.0.0.1:19527', // 设置你的后端 API 地址
- changeOrigin: true, // 允许跨域
- // pathRewrite: {
- // '^/api': '', // 重写请求路径,去掉 '/api'
- // },
- },
- },
- },
- chainWebpack: config => {
- config.module
- .rule('xlsx')
- .test(/\.(xlsx)(\?.*)?$/)
- .use('file-loader')
- .loader('file-loader')
- .options({
- name: 'files/[name].[hash:8].[ext]'
- });
- }
- };
|