fix(web): restore turbopack SVG loader (fixes React #130)
The turbopack.rules config for @svgr/webpack was removed during the Payload integration attempts. Without it, SVG imports return raw module objects instead of React components. This crashes LocaleCustomizer → Icons.UnitedKingdom → object → React #130. Next.js 16.2.2 supports turbopack in production builds, so this config is safe now. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -87,6 +87,15 @@ const config: NextConfig = {
|
|||||||
"@payloadcms/richtext-lexical",
|
"@payloadcms/richtext-lexical",
|
||||||
"sharp",
|
"sharp",
|
||||||
],
|
],
|
||||||
|
turbopack: {
|
||||||
|
rules: {
|
||||||
|
"*.svg": {
|
||||||
|
loaders: ["@svgr/webpack"],
|
||||||
|
as: "*.js",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
images: {
|
images: {
|
||||||
remotePatterns: [
|
remotePatterns: [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user