-
Notifications
You must be signed in to change notification settings - Fork 12
/
next.config.ts
39 lines (37 loc) · 963 Bytes
/
next.config.ts
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
import type { NextConfig } from 'next';
import MonacoWebpackPlugin from 'monaco-editor-webpack-plugin';
const nextConfig: NextConfig = {
/* config options here */
output: 'export',
images: {
unoptimized: true,
},
...(process.env.DEV === 'true'
? {
async rewrites() {
// proxy to get the assets from developers.redhat.com
return [
{
source: '/modules/:path*',
destination: 'http://localhost:3001/modules/:path*',
},
];
},
basePath: '',
}
: {
basePath: '/api-catalog',
}),
webpack: (config, { isServer }) => {
if (!isServer) {
config.plugins.push(
new MonacoWebpackPlugin({
languages: ['go', 'python', 'java', 'javascript', 'shell', 'cpp', 'ruby', 'json'],
filename: 'static/[name].worker.js',
}),
);
}
return config;
},
};
export default nextConfig;