12345678910111213141516171819202122232425262728 |
- 'use strict'
- const path = require('path')
- function resolve(dir) {
- return path.join(__dirname, dir)
- }
- module.exports = {
- publicPath: '/',
- outputDir: 'dist',
- assetsDir: 'static',
- chainWebpack: config => {
- config.resolve.alias
- .set("@", resolve("src"))
- },
- devServer: {
- proxy: {
- '/work': {
- target: "http://127.0.0.1:8000",
- changeOrigin: true,
- pathRewrite: {
- '^/work': '/work' //重定向
- }
- }
- }
- }
- }
|