summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-ui/next.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'opendc-web/opendc-web-ui/next.config.js')
-rw-r--r--opendc-web/opendc-web-ui/next.config.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/opendc-web/opendc-web-ui/next.config.js b/opendc-web/opendc-web-ui/next.config.js
index 59341b1f..d8029108 100644
--- a/opendc-web/opendc-web-ui/next.config.js
+++ b/opendc-web/opendc-web-ui/next.config.js
@@ -23,14 +23,16 @@
// PatternFly 4 uses global CSS imports in its distribution files. Therefore,
// we need to transpile the modules before we can use them.
const { withGlobalCss } = require('next-global-css')
+const { PHASE_DEVELOPMENT_SERVER } = require("next/constants");
const withConfig = withGlobalCss()
-module.exports = withConfig({
+module.exports = (phase) => withConfig({
+ basePath: process.env.NEXT_BASE_PATH && '/' + process.env.NEXT_BASE_PATH,
reactStrictMode: true,
experimental: {
eslint: true
},
- distDir: 'build/next',
+ distDir: phase === PHASE_DEVELOPMENT_SERVER ? 'build/next-dev' : 'build/next',
async redirects() {
return [
{