fix: add webpack resolve alias, hoping it would fix can't resolve alias path

This commit is contained in:
mbaharip
2025-01-24 18:12:10 +07:00
parent 0bf1974e4b
commit 4dce74c506
+8
View File
@@ -1,9 +1,17 @@
/* eslint-disable */ /* eslint-disable */
const path = require("path");
/** @type {import("next").NextConfig} */ /** @type {import("next").NextConfig} */
const nextConfig = { const nextConfig = {
reactStrictMode: true, reactStrictMode: true,
pageExtensions: ["tsx", "ts"], pageExtensions: ["tsx", "ts"],
webpack: (config) => {
config.resolve.alias = {
...config.resolve.alias,
"~": path.resolve(__dirname, "./"),
};
return config;
},
}; };
module.exports = nextConfig; module.exports = nextConfig;