-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnext.config.js
30 lines (25 loc) · 878 Bytes
/
next.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/**
* @type {import('next').NextConfig}
* */
// import { join, relative } from 'path'
// eslint-disable-next-line prettier/prettier
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require('path')
const STYLES_PATH = 'src/features/ui/styles/'
module.exports = {
sassOptions: {
includePaths: [path.join(__dirname, STYLES_PATH)],
prependData: (content, { resourcePath, rootContext }) => {
// More information about available properties https://webpack.js.org/api/loaders/
const relativePath = path.relative(rootContext, resourcePath).replace(/\\/g, '/')
// prevent import loop in sass modules
const isModule = relativePath.startsWith(STYLES_PATH)
if (isModule) return content
return `@use 'common' as *; ${content}`
}
},
reactStrictMode: true,
env: {
API_URL: process.env.API_URL
}
}