Replace /api/collect with collectEndpoint

This commit is contained in:
rohandebsarkar 2022-07-03 10:07:36 +05:30
parent ae48ff0e68
commit c60ec2fb8b
No known key found for this signature in database
GPG Key ID: 3DA3229799D1A181
3 changed files with 929 additions and 931 deletions

View File

@ -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",

View File

@ -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 } }),
],
};

1847
yarn.lock

File diff suppressed because it is too large Load Diff