Fix tracker build for COLLECT_API_ENDPOINT.

This commit is contained in:
Mike Cao 2022-07-21 19:38:24 -07:00
parent 250cdce306
commit c47b244dc5

View File

@ -1,3 +1,4 @@
import 'dotenv/config';
import buble from '@rollup/plugin-buble'; import buble from '@rollup/plugin-buble';
import replace from '@rollup/plugin-replace'; import replace from '@rollup/plugin-replace';
import { terser } from 'rollup-plugin-terser'; import { terser } from 'rollup-plugin-terser';
@ -12,6 +13,7 @@ export default {
replace({ replace({
'/api/collect': process.env.COLLECT_API_ENDPOINT || '/api/collect', '/api/collect': process.env.COLLECT_API_ENDPOINT || '/api/collect',
delimiters: ['', ''], delimiters: ['', ''],
preventAssignment: true,
}), }),
buble({ objectAssign: true }), buble({ objectAssign: true }),
terser({ compress: { evaluate: false } }), terser({ compress: { evaluate: false } }),