diff --git a/package.json b/package.json index 3555c80139..b4fc3967d2 100644 --- a/package.json +++ b/package.json @@ -132,5 +132,8 @@ }, "publishConfig": { "access": "public" + }, + "dependencies": { + "dotenv": "^16.4.5" } } diff --git a/src/js/analytics.js b/src/js/analytics.js index 7522bdf963..e8a4d7beb6 100644 --- a/src/js/analytics.js +++ b/src/js/analytics.js @@ -1,4 +1,5 @@ import domready from './domready'; +require('dotenv').config({ path: '../../.env' }); export let trackEvent = () => {}; diff --git a/yarn.lock b/yarn.lock index 208423613e..9bcc8028b3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4490,6 +4490,11 @@ dot-prop@^5.2.0: dependencies: is-obj "^2.0.0" +dotenv@^16.4.5: + version "16.4.5" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f" + integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg== + duplexer2@^0.1.2, duplexer2@~0.1.0, duplexer2@~0.1.2: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1"