-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.mjs
84 lines (76 loc) · 1.88 KB
/
next.config.mjs
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import bundleAnalyzer from "@next/bundle-analyzer"
import CopyPlugin from "copy-webpack-plugin"
import path from "path"
import { fileURLToPath } from "url"
import i18nConfig from "./next-i18next.config.js"
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const withBundleAnalyzer = bundleAnalyzer({ enabled: false })
/** @type {import('next').NextConfig} */
const config = {
swcMinify: true,
productionBrowserSourceMaps: true,
images: {
remotePatterns: [
{ hostname: "cdn.sanity.io" },
{ hostname: "source.unsplash.com" },
],
},
typescript: {
// ignoreBuildErrors: process.env.VERCEL_ENV === 'production',
ignoreBuildErrors: true,
},
eslint: {
// ignoreDuringBuilds: process.env.VERCEL_ENV === 'production',
ignoreDuringBuilds: true,
},
async rewrites() {
return [
{
source: "/",
destination: "/home",
},
// {
// source: "/en-US",
// destination: "/en-US/index",
// locale: false,
// },
// {
// source: "/es-ES",
// destination: "/es-ES/index",
// locale: false,
// },
]
},
sassOptions: {
includePaths: ["./src"],
prependData: `@import "styles/variables.module.scss";`,
},
i18n: i18nConfig.i18n,
// webpack(config) {
// config.plugins.push(
// require('unplugin-icons/webpack')({
// compiler: 'jsx',
// jsx: 'react',
// }),
// )
// return config
// },
webpack: config => {
config.plugins.push(
new CopyPlugin({
patterns: [
{
from: path.join(
__dirname,
"node_modules/@material-design-icons/svg/filled"
),
to: path.join(__dirname, "public/icons"),
},
],
})
)
return config
},
}
export default withBundleAnalyzer(config)