-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.config.js
45 lines (39 loc) · 874 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
const withPWA = require('next-pwa');
const withPlugins = require('next-compose-plugins');
const NODE_ENV = process.env.NODE_ENV;
const dualENV = {
production: {
PUBLIC_URL: 'https://dashboard.mts-technonatura.vercel.app',
},
development: {
PUBLIC_URL: 'http://localhost:3000',
},
signup: process.env.NEXT_PUBLIC_SIGNUP_API,
};
const env = {
...dualENV[NODE_ENV],
isProduction: NODE_ENV === 'production',
};
// next.js configuration
const nextConfig = {
webpack: (config, { isServer }) => {
config.module.rules.push({
test: /\.svg$/,
use: ['@svgr/webpack', 'url-loader'],
});
return config;
},
env,
};
const plugins = [
[
withPWA,
{
pwa: {
disable: process.env.NODE_ENV === 'development',
dest: 'public',
},
},
],
];
module.exports = withPlugins([...plugins], nextConfig);