mirror of
https://github.com/kremalicious/umami.git
synced 2025-01-24 09:13:42 +01:00
Replace /api/collect
with collectEndpoint
This commit is contained in:
parent
ae48ff0e68
commit
c60ec2fb8b
@ -101,6 +101,7 @@
|
||||
"devDependencies": {
|
||||
"@formatjs/cli": "^4.2.29",
|
||||
"@rollup/plugin-buble": "^0.21.3",
|
||||
"@rollup/plugin-replace": "^4.0.0",
|
||||
"@svgr/webpack": "^6.2.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^7.32.0",
|
||||
|
@ -1,4 +1,5 @@
|
||||
import buble from '@rollup/plugin-buble';
|
||||
import replace from '@rollup/plugin-replace';
|
||||
import { terser } from 'rollup-plugin-terser';
|
||||
|
||||
export default {
|
||||
@ -7,5 +8,14 @@ export default {
|
||||
file: 'public/umami.js',
|
||||
format: 'iife',
|
||||
},
|
||||
plugins: [buble({ objectAssign: true }), terser({ compress: { evaluate: false } })],
|
||||
plugins: [
|
||||
replace({
|
||||
'/api/collect': process.env.API_COLLECT_ENDPOINT
|
||||
? process.env.API_COLLECT_ENDPOINT
|
||||
: '/api/collect',
|
||||
delimiters: ['', ''],
|
||||
}),
|
||||
buble({ objectAssign: true }),
|
||||
terser({ compress: { evaluate: false } }),
|
||||
],
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user