aboutsummaryrefslogtreecommitdiffstats
path: root/config/webpack/webpack.common.js
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-02-24 13:50:53 +0100
committerArmand Philippot <git@armandphilippot.com>2022-02-24 13:50:53 +0100
commitca734febb23133e2b405cdc69e58d9cf6011298f (patch)
treed421b89fc268b3da5c4dd2b8098a34c4466ee209 /config/webpack/webpack.common.js
parente10f46c20226609198ac2a1cceab056e87e4d847 (diff)
parent204a0c7b9665e3f85b3839a3007c1063bd436e77 (diff)
feat: replace Matomo with Ackee
I cannot test locally because of CORS policy.
Diffstat (limited to 'config/webpack/webpack.common.js')
-rw-r--r--config/webpack/webpack.common.js14
1 files changed, 14 insertions, 0 deletions
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,
+ },
+ },
};