forked from php1301/wdssuper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
41 lines (36 loc) · 1.04 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
const withPlugins = require("next-compose-plugins");
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});
const { i18n } = require("./next-i18next.config");
const runtimeCaching = require("next-pwa/cache");
const withPWA = require("next-pwa")({
pwa: {
disable: process.env.NODE_ENV !== "production",
dest: "public",
runtimeCaching,
},
i18n,
});
// const { nextI18NextRewrites } = require("next-i18next/rewrites");
const localeSubpaths = {
tr: "tr",
en: "en",
};
const config = {
devServer: {
proxy: {
"/api": "http://localhost:3000",
},
},
eslint: {
// Warning: Dangerously allow production builds to successfully complete even if
// your project has ESLint errors.
ignoreDuringBuilds: true,
},
// rewrites: async () => nextI18NextRewrites(localeSubpaths),
publicRuntimeConfig: {
localeSubpaths,
},
};
module.exports = withPlugins([[withBundleAnalyzer, withPWA]], config);