Having trouble utilizing @/ imports within my scss files.
The variables I need are stored in src/styles/_variables.scss
Here is my tsconfig.json:
{
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"baseUrl": ".",
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/": ["./src/"],
"@/styles/": ["styles/"],
"@/components/": ["components/"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
In my next.config.mjs file:
/** @type {import('next').NextConfig} */
const nextConfig = {
sassOptions: {
includePaths: [path.join(__dirname, "styles/")],
},
};
export default nextConfig;
Struggling to troubleshoot this issue. Any insights would be greatly appreciated.
Seems like I've followed all the necessary steps to enable absolute imports in an .scss file, but it's not working as expected.