Skip to content

Commit b5794b9

Browse files
committed
remove webpack cache
1 parent c7a5639 commit b5794b9

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

next.config.js

+16
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,29 @@ const rewrites = require('./nextjs/rewrites');
1212

1313
/** @type {import('next').NextConfig} */
1414
const moduleExports = {
15+
webpack: (config) => {
16+
if (config.cache && !dev) {
17+
config.cache = Object.freeze({
18+
type: 'memory',
19+
})
20+
}
21+
// Important: return the modified config
22+
return config
23+
},
1524
transpilePackages: [
1625
'react-syntax-highlighter',
1726
'swagger-client',
1827
'swagger-ui-react',
1928
],
2029
reactStrictMode: true,
2130
webpack(config) {
31+
// Fix the Cloudflare upload max. size issue
32+
if (process.env.GITHUB_ACTIONS === "true") {
33+
config.cache = Object.freeze({
34+
type: 'memory',
35+
})
36+
}
37+
2238
config.module.rules.push(
2339
{
2440
test: /\.svg$/,

0 commit comments

Comments
 (0)