We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2734d7 commit 1968706Copy full SHA for 1968706
packages/build/src/analytics.ts
@@ -1,11 +1,5 @@
1
import util from 'util';
2
import fs from 'fs';
3
-import handlebars from 'handlebars';
4
-
5
-/**
6
- * The template.
7
- */
8
-const TEMPLATE = 'module.exports = { SEGMENT_API_KEY: "{{segmentKey}}" };';
9
10
/**
11
* Create the analytics config.
@@ -15,8 +9,7 @@ const TEMPLATE = 'module.exports = { SEGMENT_API_KEY: "{{segmentKey}}" };';
15
* @returns {string} The compiled template.
16
*/
17
export function createAnalyticsConfig(segmentKey: string): string {
18
- const template = handlebars.compile(TEMPLATE);
19
- return template({ segmentKey: segmentKey });
12
+ return `module.exports = { SEGMENT_API_KEY: ${JSON.stringify(segmentKey)} };`;
20
13
}
21
14
22
0 commit comments