-
Notifications
You must be signed in to change notification settings - Fork 2
/
next.config.js
50 lines (44 loc) · 1.37 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
42
43
44
45
46
47
48
49
50
const { i18n } = require('./next-i18next.config.js');
const nextConfig = {
eslint: {
dirs: ['pages'],
},
reactStrictMode: true,
// swcMinify: false,
env: {
VIVO_URL_BASE: process.env.VIVO_URL_BASE,
VIVO_URL_ITEM_BASE: process.env.VIVO_URL_ITEM_BASE,
LANGUAGES: process.env.LANGUAGES,
ELASTIC_INDEXES: process.env.ELASTIC_INDEXES,
PUBLIC_RECAPTCHA_SITE_KEY: process.env.PUBLIC_RECAPTCHA_SITE_KEY,
INDEX_PUBLICATION: process.env.INDEX_PUBLICATION,
INDEX_PERSON: process.env.INDEX_PERSON,
INDEX_ORGUNIT: process.env.INDEX_ORGUNIT,
INDEX_JOURNAL: process.env.INDEX_JOURNAL,
INDEX_PROGRAM: process.env.INDEX_PROGRAM,
INDEX_PATENT: process.env.INDEX_PATENT,
INDEX_GROUP: process.env.INDEX_GROUP,
INDEX_SOFTWARE: process.env.INDEX_SOFTWARE,
BRCRIS_HOST_BASE: process.env.BRCRIS_HOST_BASE,
},
i18n,
webpack: (config, { webpack, isServer }) => {
config.experiments = { ...config.experiments, topLevelAwait: true };
config.externals["node:fs"] = "commonjs node:fs";
if (!isServer) {
config.resolve.fallback = {
fs: false,
};
}
config.plugins.push(
new webpack.NormalModuleReplacementPlugin(
/^node:/,
(resource) => {
resource.request = resource.request.replace(/^node:/, '');
},
),
);
return config;
},
};
module.exports = nextConfig;