Skip to content

Commit

Permalink
Merge pull request #500 from S007K/S007K-fixed-import-aliases
Browse files Browse the repository at this point in the history
Update next.config.js
  • Loading branch information
devsargam authored Aug 26, 2024
2 parents cdc4607 + 41c2bb6 commit 99062fd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions apps/web/next.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
/** @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;
Expand Down

0 comments on commit 99062fd

Please sign in to comment.