aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.env.example6
-rw-r--r--config/webpack/webpack.common.js14
2 files changed, 20 insertions, 0 deletions
diff --git a/.env.example b/.env.example
index 5c9f355..7dba9e2 100644
--- a/.env.example
+++ b/.env.example
@@ -3,6 +3,12 @@
CURRENT_ENV='development'
#########################
+# Ackee configuration #
+#########################
+ACKEE_DOMAIN="www.ackeeDomain.com"
+ACKEE_SITE_ID="your-id-string"
+
+#########################
# webpack configuration #
#########################
# Your virtual host.
diff --git a/config/webpack/webpack.common.js b/config/webpack/webpack.common.js
index c2155e9..5396cb4 100644
--- a/config/webpack/webpack.common.js
+++ b/config/webpack/webpack.common.js
@@ -1,5 +1,7 @@
const ImageMinimizerPlugin = require('image-minimizer-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');
+const { DefinePlugin } = require('webpack');
+const dotenv = require('dotenv').config();
const paths = require('./paths');
module.exports = {
@@ -102,5 +104,17 @@ module.exports = {
{ from: paths.src.images, to: 'images', noErrorOnMissing: true },
],
}),
+ new DefinePlugin({
+ 'process.env': JSON.stringify(dotenv.parsed),
+ 'process.env.ACKEE_DOMAIN': JSON.stringify(process.env.ACKEE_DOMAIN),
+ 'process.env.ACKEE_SITE_ID': JSON.stringify(process.env.ACKEE_SITE_ID),
+ }),
],
+ resolve: {
+ fallback: {
+ fs: false,
+ path: false,
+ os: false,
+ },
+ },
};