From 4e8c34de919983e4f96acdbffb2bfcc33f29ad01 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Fri, 16 Jul 2021 11:25:09 +0100 Subject: [PATCH] udpdated build config --- next.config.js | 46 +++++++++++++++++++++++++--------------------- package.json | 2 +- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/next.config.js b/next.config.js index 03151891..c627d891 100644 --- a/next.config.js +++ b/next.config.js @@ -18,28 +18,32 @@ const nextTranslate = require("next-translate"); // }; module.exports = withStyles({ - sass: true, // use .scss files - modules: true, // style.(m|module).css & style.(m|module).scss for module files - sassLoaderOptions: { - sassOptions: { - includePaths: [ - "/styles/sass", - "node_modules/govuk-frontend/govuk/all", - "/styles/sass/patterns", - "/styles/sass/prevent-training", - ], // @import 'variables'; # loads (src/styles/varialbes.scss), you got it.. + sass: true, // use .scss files + modules: true, // style.(m|module).css & style.(m|module).scss for module files + sassLoaderOptions: { + sassOptions: { + includePaths: [ + "/styles/sass", + "node_modules/govuk-frontend/govuk/all", + "/styles/sass/patterns", + "/styles/sass/prevent-training", + ], // @import 'variables'; # loads (src/styles/varialbes.scss), you got it.. + }, }, - }, }); module.exports = { - poweredByHeader: false, - env:{ - // GRANT_TYPE : 'password', - // USERNAME : 'api', - // API_ROOT : "https://api.dev.prevent.internal.rehab", - // PASSWORD : 'B69eQwv7rzPBNcA', - // CLIENT_ID : 'fa1f0ef2-f10f-462e-98a5-843359db6066', - // CLIENT_SECRET : 'B69eQwv7rzPBNcA', - }, - ...nextTranslate(), + generateBuildId: async () => { + // You can, for example, get the latest git commit hash here + return "pinswg-build-id"; + }, + poweredByHeader: false, + env: { + // GRANT_TYPE : 'password', + // USERNAME : 'api', + // API_ROOT : "https://api.dev.prevent.internal.rehab", + // PASSWORD : 'B69eQwv7rzPBNcA', + // CLIENT_ID : 'fa1f0ef2-f10f-462e-98a5-843359db6066', + // CLIENT_SECRET : 'B69eQwv7rzPBNcA', + }, + ...nextTranslate(), }; diff --git a/package.json b/package.json index e8fbee16..53de0c0f 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "dev": "next dev", - "build": "next build", + "build": "NODE_ENV=production node_modules/next/dist/bin/next build", "start": "node_modules/next/dist/bin/next start -p $PORT" }, "dependencies": {