mirror of
https://github.com/gramps-project/gramps-web.git
synced 2026-10-16 21:01:38 +08:00
[rollup] Add API_URL environment variable
This commit is contained in:
+6
-1
@@ -9,6 +9,11 @@ const baseConfig = createSpaConfig({
|
||||
})
|
||||
|
||||
|
||||
const API_URL = (process.env.API_URL === undefined)
|
||||
? ''
|
||||
: process.env.API_URL
|
||||
|
||||
|
||||
export default merge(baseConfig, {
|
||||
input: './index.html',
|
||||
plugins: [
|
||||
@@ -19,7 +24,7 @@ export default merge(baseConfig, {
|
||||
]
|
||||
}),
|
||||
replace({
|
||||
'http://localhost:5555': ''
|
||||
'http://localhost:5555': API_URL
|
||||
})
|
||||
]
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user