forked from Authing/Guard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
49 lines (48 loc) · 1.19 KB
/
vue.config.js
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
const HtmlWebpackPlugin = require("html-webpack-plugin");
const Dotenv = require("dotenv-webpack");
// const path = require("path")
// const fs = require("fs")
require('dotenv').config({
path: '.env'
})
let host = process.env.ServerHost || "http://localhost:5510";
module.exports = {
lintOnSave: false,
configureWebpack: {
output: {
libraryExport: "default",
},
plugins: [
new Dotenv(),
new HtmlWebpackPlugin({
API_ENDPOINT: process.env.API_ENDPOINT,
PUBLIC_KEY: process.env.PUBLIC_KEY,
inject: true,
template: "public/index.html",
}),
],
},
css: { extract: false },
publicPath: process.env.PUBLIC_PATH || "/",
devServer: {
https: true,
// cert: fs.readFileSync(path.join(__dirname,'ssl/214413890430280.pem')),
// key: fs.readFileSync(path.join(__dirname,'ssl/214413890430280.key')),
disableHostCheck: true,
port: 443,
proxy: {
"^/authorize": {
target: `${host}/sso`,
changeOrigin: true,
},
"^/oauth": {
target: `${host}`,
changeOrigin: true,
},
"^/cas/session": {
target: `${host}`,
changeOrigin: true,
},
},
},
};