-
Notifications
You must be signed in to change notification settings - Fork 6
/
next.config.js
31 lines (30 loc) · 1003 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
// This file is not going through babel transformation.
// So, we write it in vanilla JS
// (But you could use ES2015 features supported by your Node.js version)
const debug = process.env.NODE_ENV !== "production";
module.exports = {
pageExtensions: ["page.tsx", "page.ts", "page.jsx", "page.js"],
exportPathMap: function () {
return {
"/": { page: "/" },
"/suapc": { page: "/suapc" },
"/halloffame": { page: "/halloffame" },
"/sponsor": { page: "/sponsor" },
"/campcontest": { page: "/campcontest" },
};
},
assetPrefix: !debug ? "" : "",
webpack: (config, { dev }) => {
// Perform customizations to webpack config
// console.log('webpack');
// console.log(config.module.rules, dev);
config.module.rules = config.module.rules.map((rule) => {
if (rule.loader === "babel-loader") {
rule.options.cacheDirectory = false;
}
return rule;
});
// Important: return the modified config
return config;
},
};