-
-
Notifications
You must be signed in to change notification settings - Fork 430
Open
Description
💬 Questions and Help
Nowadays, when generating a build for production, the NextJS rule doesn't apply. The SVG ends up being generated as an asset when I expect an inline component.
/** @type {import('next').NextConfig} */
const nextConfig = {
turbopack: {
rules: {
'*.svg': {
loaders: ['@svgr/webpack'],
as: '*.js',
},
},
},
};
export default nextConfig;
// added by create cloudflare to enable calling `getCloudflareContext()` in `next dev`
import { initOpenNextCloudflareForDev } from '@opennextjs/cloudflare';
initOpenNextCloudflareForDev();
usage component working on local with node
import PersonalizedIcon from "../assets/svg/personalizate.svg"
<PersonalizedIcon />
error result with cloudflare workers:
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
ItsRyanWu
Metadata
Metadata
Assignees
Labels
No labels