From 1160adf342defc5d067e31e8323b8930661814c7 Mon Sep 17 00:00:00 2001 From: jpveooys <66470099+jpveooys@users.noreply.github.com> Date: Fri, 17 Feb 2023 16:56:58 +0000 Subject: [PATCH] build: Remove next-compose-plugins It was causing a number of warnings when building: ``` warn - Invalid next.config.js options detected: - The root value has an unexpected property, webpackDevMiddleware, which is not in the list of allowed properties (amp, analyticsId, assetPrefix, basePath, cleanDistDir, compiler, compress, crossOrigin, devIndicators, distDir, env, eslint, excludeDefaultMomentLocales, experimental, exportPathMap, future, generateBuildId, generateEtags, headers, httpAgentOptions, i18n, images, onDemandEntries, optimizeFonts, output, outputFileTracing, pageExtensions, poweredByHeader, productionBrowserSourceMaps, publicRuntimeConfig, reactStrictMode, redirects, rewrites, sassOptions, serverRuntimeConfig, staticPageGenerationTimeout, swcMinify, trailingSlash, typescript, useFileSystemPublicRoutes, webpack). - The root value has an unexpected property, configOrigin, which is not in the list of allowed properties (amp, analyticsId, assetPrefix, basePath, cleanDistDir, compiler, compress, crossOrigin, devIndicators, distDir, env, eslint, excludeDefaultMomentLocales, experimental, exportPathMap, future, generateBuildId, generateEtags, headers, httpAgentOptions, i18n, images, onDemandEntries, optimizeFonts, output, outputFileTracing, pageExtensions, poweredByHeader, productionBrowserSourceMaps, publicRuntimeConfig, reactStrictMode, redirects, rewrites, sassOptions, serverRuntimeConfig, staticPageGenerationTimeout, swcMinify, trailingSlash, typescript, useFileSystemPublicRoutes, webpack). - The root value has an unexpected property, target, which is not in the list of allowed properties (amp, analyticsId, assetPrefix, basePath, cleanDistDir, compiler, compress, crossOrigin, devIndicators, distDir, env, eslint, excludeDefaultMomentLocales, experimental, exportPathMap, future, generateBuildId, generateEtags, headers, httpAgentOptions, i18n, images, onDemandEntries, optimizeFonts, output, outputFileTracing, pageExtensions, poweredByHeader, productionBrowserSourceMaps, publicRuntimeConfig, reactStrictMode, redirects, rewrites, sassOptions, serverRuntimeConfig, staticPageGenerationTimeout, swcMinify, trailingSlash, typescript, useFileSystemPublicRoutes, webpack). - The root value has an unexpected property, webpack5, which is not in the list of allowed properties (amp, analyticsId, assetPrefix, basePath, cleanDistDir, compiler, compress, crossOrigin, devIndicators, distDir, env, eslint, excludeDefaultMomentLocales, experimental, exportPathMap, future, generateBuildId, generateEtags, headers, httpAgentOptions, i18n, images, onDemandEntries, optimizeFonts, output, outputFileTracing, pageExtensions, poweredByHeader, productionBrowserSourceMaps, publicRuntimeConfig, reactStrictMode, redirects, rewrites, sassOptions, serverRuntimeConfig, staticPageGenerationTimeout, swcMinify, trailingSlash, typescript, useFileSystemPublicRoutes, webpack). - The value at .amp.canonicalBase must be 1 character or more but it was 0 characters. - The value at .assetPrefix must be 1 character or more but it was 0 characters. - The value at .experimental.outputFileTracingRoot must be 1 character or more but it was 0 characters. - The value at .i18n must be an object but it was null. See more info here: https://nextjs.org/docs/messages/invalid-next-config ``` See https://github.com/cyrilwanner/next-compose-plugins/issues/59. --- next.config.js | 5 +---- package.json | 1 - yarn.lock | 5 ----- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/next.config.js b/next.config.js index c7d81998..a9d0a8c7 100644 --- a/next.config.js +++ b/next.config.js @@ -1,9 +1,6 @@ -const withPlugins = require('next-compose-plugins') const withTM = require('next-transpile-modules')(['hex-rgb']) -module.exports = withPlugins([withTM], { - // other configs... - +module.exports = withTM({ webpack(config) { config.module.rules.push({ test: /\.svg$/i, diff --git a/package.json b/package.json index f410cd9e..ce7b68ff 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,6 @@ "jest-styled-components": "^7.1.1", "local-cypress": "^1.2.6", "markdown-to-jsx": "^7.1.7", - "next-compose-plugins": "^2.2.1", "next-transpile-modules": "^9.0.0", "prettier": "^2.8.1", "semantic-release": "^19.0.5", diff --git a/yarn.lock b/yarn.lock index fc8cf067..2ed654a7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15068,11 +15068,6 @@ nested-error-stacks@^2.0.0, nested-error-stacks@^2.1.0: resolved "https://registry.yarnpkg.com/nested-error-stacks/-/nested-error-stacks-2.1.0.tgz#0fbdcf3e13fe4994781280524f8b96b0cdff9c61" integrity sha512-AO81vsIO1k1sM4Zrd6Hu7regmJN1NSiAja10gc4bX3F0wd+9rQmcuHQaHVQCYIEC8iFXnE+mavh23GOt7wBgug== -next-compose-plugins@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/next-compose-plugins/-/next-compose-plugins-2.2.1.tgz#020fc53f275a7e719d62521bef4300fbb6fde5ab" - integrity sha512-OjJ+fV15FXO2uQXQagLD4C0abYErBjyjE0I0FHpOEIB8upw0hg1ldFP6cqHTJBH1cZqy96OeR3u1dJ+Ez2D4Bg== - next-transpile-modules@^9.0.0: version "9.0.0" resolved "https://registry.yarnpkg.com/next-transpile-modules/-/next-transpile-modules-9.0.0.tgz#133b1742af082e61cc76b02a0f12ffd40ce2bf90"