Сайт на next js
next config:
require("dotenv").config()
module.exports = {
reactStrictMode: true,
swcMinify: true,
compiler: {
removeConsole: true
},
env: {
API_URL: process.env.API_URL,
STATIC_URL: process.env.STATIC_URL,
RESPONSIVE_LAPTOP_MAX_WIDTH: process.env.RESPONSIVE_LAPTOP_MAX_WIDTH,
RESPONSIVE_TABLET_MAX_WIDTH: process.env.RESPONSIVE_TABLET_MAX_WIDTH,
RESPONSIVE_MOBILE_MAX_WIDTH: process.env.RESPONSIVE_MOBILE_MAX_WIDTH
},
images: {
domains: process.env.IMAGES_DOMAINS.split(",")
},
sassOptions: {
prependData: `$STATIC_URL: '${process.env.STATIC_URL}';
$RESPONSIVE_LAPTOP_MAX_WIDTH: '${process.env.RESPONSIVE_LAPTOP_MAX_WIDTH}px';
$RESPONSIVE_TABLET_MAX_WIDTH: '${process.env.RESPONSIVE_TABLET_MAX_WIDTH}px';
$RESPONSIVE_MOBILE_MAX_WIDTH: '${process.env.RESPONSIVE_MOBILE_MAX_WIDTH}px';`
},
presets: [
[
"next/babel",
{
"preset-env": {
useBuiltIns: false,
targets: {
esmodules: true,
browsers: "> 0.25%, not dead"
}
}
}
]
]
}