1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
| const { defineConfig } = require("@vue/cli-service");
| const NodePolyfillPlugin = require("node-polyfill-webpack-plugin");
| const path = require("path");
| const TITLE = process.env.VUE_APP_TITLE;
| const scss_path = `@/assets/theme/index.scss`;
|
| module.exports = defineConfig({
| transpileDependencies: true,
| lintOnSave: false,
| productionSourceMap: false,
| configureWebpack: (config) => {
| (config.output.filename = `js/[name].[contenthash].js`),
| (config.output.chunkFilename = `js/[name].[contenthash].js`),
| config.plugins.push(new NodePolyfillPlugin());
| },
| //publicPath: './', //打包APP用,打包时,需要隐藏首页连接钱包按钮和授权按钮
| publicPath: "/wap/", // H5网页用,默认展示:连接钱包和授权按钮的。
| //publicPath: '/wod/', //苹果免签包H5网页用,打包时,需要隐藏首页连接钱包按钮和授权按钮
| outputDir: "dist",
| assetsDir: "",
| chainWebpack: (config) => {
| config.plugin("html").tap((args) => {
| args[0].title = TITLE;
| return args;
| });
| },
| css: {
| loaderOptions: {
| scss: {
| additionalData: `@import "${scss_path}";`,
| },
| },
| },
| devServer: {
| client: {
| overlay: false,
| },
| port: 8090,
| host: "0.0.0.0",
| https: false,
| open: true,
| proxy: {
| // 可为不同的接口配置不同的代理地址
| "/wap/api": {
| // 服务地址,即你要访问的服务器地址
| target: "https://bingx.zqbom.com/",
| // 路径重写,将'/user/login'重写为'/login'
| pathRewrite: {
| "^/wap/api": "",
| },
| // 所有信息都在命令行工具打印
| logLevel: "debug",
| },
| "/wap/api": {
| // 服务地址,即你要访问的服务器地址
| target: "http://103.215.76.36:18080/",
| // 路径重写,将'/user/login'重写为'/login'
| pathRewrite: {
| "^/wap/api": "",
| },
| // 所有信息都在命令行工具打印
| logLevel: "debug",
| },
| },
| },
| });
|
|