diff --git a/next.config.js b/next.config.js index 45a8a9c..8afe73b 100644 --- a/next.config.js +++ b/next.config.js @@ -1,6 +1,6 @@ /* eslint-disable operator-linebreak */ /* 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 withGraphQL = require('next-plugin-graphql'); @@ -36,20 +36,17 @@ const nextConfig = { }, }; -const plugins = [ - [ - withLess, - { - lessLoaderOptions: { - lessOptions: { - modifyVars: { - 'primary-color': process.env.NEXT_PUBLIC_COLOR_PRIMARY, - }, - }, +const plugins = [withLess, withGraphQL]; + +const config = { + ...nextConfig, + lessLoaderOptions: { + lessOptions: { + modifyVars: { + 'primary-color': process.env.NEXT_PUBLIC_COLOR_PRIMARY, }, }, - ], - [withGraphQL], -]; + }, +}; -module.exports = withPlugins(plugins, nextConfig); +module.exports = withPlugins(config, plugins); diff --git a/package.json b/package.json index 60fdf91..ae82352 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "mobx": "^6.7.0", "mobx-react-lite": "^3.4.0", "next": "^12.3.0", - "next-compose-plugins": "^2.2.1", + "next-composed-plugins": "^1.0.1", "next-plugin-graphql": "^0.0.2", "next-with-less": "^2.0.5", "normalize.css": "^8.0.1", diff --git a/yarn.lock b/yarn.lock index 0061dd3..2639bb6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6561,7 +6561,7 @@ __metadata: mobx-react-lite: ^3.4.0 msw: ^0.39.2 next: ^12.3.0 - next-compose-plugins: ^2.2.1 + next-composed-plugins: ^1.0.1 next-plugin-graphql: ^0.0.2 next-with-less: ^2.0.5 normalize.css: ^8.0.1 @@ -9932,10 +9932,10 @@ __metadata: languageName: node linkType: hard -"next-compose-plugins@npm:^2.2.1": - version: 2.2.1 - resolution: "next-compose-plugins@npm:2.2.1" - checksum: 771762fda2b12b81daf10431cbb494816cff96be02b44009692c6c0eefbacd62cbf51ddb93af8d3380ec00254c6a95d64d10f744d4b9ddadefc21efee7dc69fc +"next-composed-plugins@npm:^1.0.1": + version: 1.0.1 + resolution: "next-composed-plugins@npm:1.0.1" + checksum: aadb57d44d3176e64ab08b9afd412c4c56d3e09cde86bf127b1a5997383fd20ddff8bbd8f3685ec2d8b37f59f142aba30e55fa21fa1ad68321f40db971a2df75 languageName: node linkType: hard