| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- const path = require('path')
- function resolve(dir) {
- return path.join(__dirname, dir)
- }
- const name = 'HerTube'
- module.exports = {
- productionSourceMap: false,
- // options...
- devServer: {
- port: 8080,
- disableHostCheck: true
- // TODO 部署到 nginx 中后,使用 rewrite 指令配置
- /* proxy: {
- '/tnb': {
- target: process.env.VUE_APP_BASE_API,
- changeOrigin: true,
- ws: true,
- pathRewrite: {
- '^/tnb': '/tnb'
- }
- },
- '/api': {
- target: process.env.VUE_APP_BASE_API,
- changeOrigin: true,
- ws: true,
- pathRewrite: {
- '^/api': '/api'
- }
- }
- }*/
- },
- configureWebpack: {
- // provide the app's title in webpack's name field, so that
- // it can be accessed in index.html to inject the correct title.
- name: name,
- resolve: {
- alias: {
- '@': resolve('src')
- }
- }
- }
- }
|