Skip to content

Commit 54dc022

Browse files
authored
chore(gene-tools): update next.config.js generation (#42)
1 parent e235743 commit 54dc022

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

packages/gene-tools/src/generators/bff-app-generator/files/app/next.config.js__tmpl__

+4-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ const devPlugins = [];
3131
const plugins = [
3232
withNodeModulesCSS,
3333
withBundleAnalyzer,
34-
withNx,
3534
withBuildId,
35+
withNx,
3636
].concat(
3737
process.env.NEXT_PUBLIC_ENV === 'local' ? devPlugins : productionPlugins
3838
);
@@ -44,7 +44,7 @@ const domains = [
4444
'srv-supersonic-images.z-dn.net',
4545
];
4646

47-
module.exports = () => {
47+
const getConfig = () => {
4848
return plugins.reduce(
4949
(acc, next) => {
5050
if (typeof next !== 'function') {
@@ -96,3 +96,5 @@ module.exports = () => {
9696
}
9797
);
9898
};
99+
100+
module.exports = getConfig();

packages/gene-tools/src/generators/nextjs-app-generator/files/app/next.config.js__tmpl__

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const plugins = [withNodeModulesCSS, withBundleAnalyzer, withNx].concat(
2222
const domains = [
2323
];
2424

25-
module.exports = () => {
25+
const getConfig = () => {
2626
return plugins.reduce(
2727
(acc, next) => {
2828
if (typeof next !== 'function') {
@@ -74,3 +74,5 @@ module.exports = () => {
7474
}
7575
);
7676
};
77+
78+
module.exports = getConfig();

0 commit comments

Comments
 (0)