From 6e101de190aa3ca881385189df28deb9d6710ceb Mon Sep 17 00:00:00 2001 From: SAHIL KHAN <121685601+S007K@users.noreply.github.com> Date: Sat, 27 Jul 2024 14:23:44 +0530 Subject: [PATCH] Update next.config.js very long import statement which disrupts the code appearance and also make importing components harder which can be done relatively easy manner. --- apps/web/next.config.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/web/next.config.js b/apps/web/next.config.js index 2fa7f8a6..028cb956 100644 --- a/apps/web/next.config.js +++ b/apps/web/next.config.js @@ -1,8 +1,18 @@ /** @type {import('next').NextConfig} */ +const path = require('path'); const webpack = require('webpack'); module.exports = { webpack: (config) => { + + // Add path aliases + config.resolve.alias = { + ...config.resolve.alias, // preserve existing aliases + '@components': path.join(__dirname, 'components'), + '@styles': path.join(__dirname, 'styles'), + // Add more aliases as needed + }; + config.plugins.push( new webpack.ContextReplacementPlugin(/keyv/, (data) => { delete data.dependencies[0].critical;