-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
46 lines (42 loc) · 975 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
46
const { merchants }= require('./merchants.config');
const nextConfig = {
reactStrictMode: true,
webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {
// Rule for .scss or .css files
config.module.rules.push({
test: /\.s?css$/,
use: [
defaultLoaders.babel,
{
loader: require("styled-jsx/webpack").loader,
options: { type: "scoped" },
},
],
});
// Add this to handle ES modules in node_modules
if (!isServer) {
config.module.rules.push({
test: /\.m?js$/,
resolve: {
fullySpecified: false, // disable the behavior
},
include: /node_modules/,
});
}
return config;
},
output: "export",
images: {
unoptimized: true,
remotePatterns: [
{
protocol: "https",
hostname: "**",
},
],
},
env: {
SITE_URL: merchants.mb1.url,
},
};
module.exports = nextConfig;