-
Notifications
You must be signed in to change notification settings - Fork 4
/
next.config.js
30 lines (27 loc) · 946 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
const prod = process.env.NODE_ENV === "production";
const withBundleAnalyzer = require("@zeit/next-bundle-analyzer");
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
const withCSS = require('@zeit/next-css')
module.exports = withCSS({
analyzeServer: ["server", "both"].includes(process.env.BUNDLE_ANALYZE),
analyzeBrowser: ["browser", "both"].includes(process.env.BUNDLE_ANALYZE),
bundleAnalyzerConfig: {
server: {
analyzerMode: 'static',
reportFilename: '../../bundles/server.html'
},
browser: {
analyzerMode: 'static',
reportFilename: '../bundles/client.html'
}
},
serverRuntimeConfig: {
// Will only be available on the server side
mySecret: "secret"
},
publicRuntimeConfig: {
// Will be available on both server and client
backendUrl: prod ? "https://rest.urteile-gesetze.de" : "http://localhost:8090",
logging: prod ? "info" : "debug"
}
});