next.config.js: use next-composed-plugins

This commit is contained in:
vchikalkin 2022-12-21 11:04:54 +03:00
parent 156c6c51b5
commit 3dbef34d33
3 changed files with 18 additions and 21 deletions

View File

@ -1,6 +1,6 @@
/* eslint-disable operator-linebreak */ /* eslint-disable operator-linebreak */
/* eslint-disable @typescript-eslint/no-var-requires */ /* eslint-disable @typescript-eslint/no-var-requires */
const withPlugins = require('next-compose-plugins'); const { withPlugins } = require('next-composed-plugins');
const withLess = require('next-with-less'); const withLess = require('next-with-less');
const withGraphQL = require('next-plugin-graphql'); const withGraphQL = require('next-plugin-graphql');
@ -36,20 +36,17 @@ const nextConfig = {
}, },
}; };
const plugins = [ const plugins = [withLess, withGraphQL];
[
withLess, const config = {
{ ...nextConfig,
lessLoaderOptions: { lessLoaderOptions: {
lessOptions: { lessOptions: {
modifyVars: { modifyVars: {
'primary-color': process.env.NEXT_PUBLIC_COLOR_PRIMARY, 'primary-color': process.env.NEXT_PUBLIC_COLOR_PRIMARY,
},
},
}, },
}, },
], },
[withGraphQL], };
];
module.exports = withPlugins(plugins, nextConfig); module.exports = withPlugins(config, plugins);

View File

@ -36,7 +36,7 @@
"mobx": "^6.7.0", "mobx": "^6.7.0",
"mobx-react-lite": "^3.4.0", "mobx-react-lite": "^3.4.0",
"next": "^12.3.0", "next": "^12.3.0",
"next-compose-plugins": "^2.2.1", "next-composed-plugins": "^1.0.1",
"next-plugin-graphql": "^0.0.2", "next-plugin-graphql": "^0.0.2",
"next-with-less": "^2.0.5", "next-with-less": "^2.0.5",
"normalize.css": "^8.0.1", "normalize.css": "^8.0.1",

View File

@ -6561,7 +6561,7 @@ __metadata:
mobx-react-lite: ^3.4.0 mobx-react-lite: ^3.4.0
msw: ^0.39.2 msw: ^0.39.2
next: ^12.3.0 next: ^12.3.0
next-compose-plugins: ^2.2.1 next-composed-plugins: ^1.0.1
next-plugin-graphql: ^0.0.2 next-plugin-graphql: ^0.0.2
next-with-less: ^2.0.5 next-with-less: ^2.0.5
normalize.css: ^8.0.1 normalize.css: ^8.0.1
@ -9932,10 +9932,10 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"next-compose-plugins@npm:^2.2.1": "next-composed-plugins@npm:^1.0.1":
version: 2.2.1 version: 1.0.1
resolution: "next-compose-plugins@npm:2.2.1" resolution: "next-composed-plugins@npm:1.0.1"
checksum: 771762fda2b12b81daf10431cbb494816cff96be02b44009692c6c0eefbacd62cbf51ddb93af8d3380ec00254c6a95d64d10f744d4b9ddadefc21efee7dc69fc checksum: aadb57d44d3176e64ab08b9afd412c4c56d3e09cde86bf127b1a5997383fd20ddff8bbd8f3685ec2d8b37f59f142aba30e55fa21fa1ad68321f40db971a2df75
languageName: node languageName: node
linkType: hard linkType: hard