Skip to content

Conversation

@kerwynrg
Copy link

Updates to next@15 support as using this template was causing installation issues by using react 19 + next 14

Description:

  • Updated to next@15 support
  • eslint, prettier updated and configured to work together
  • typescript updated
  • Added modifications to next config to support svg url import as well as ReactComponent as mentioned in uui docs assets page
    • No need to use src for default imported svg

loader: '@svgr/webpack',
options: {
icon: true,
template: require('./svgr-template.js'),
Copy link
Collaborator

@AlekseyManetov AlekseyManetov May 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please elaborate why do we need template here? I see that it also add div wrapper for each icon, probably we can avoid it to not add unnecessary wrappers?
I've asked about config for one of our clients who also use next 15, they share following config

config.module.rules.push({
        test: /\.svg$/i,
        use: [
            {
                loader: '@svgr/webpack',
                options: {
                    svgoConfig: {
                        plugins: [
                            {
                                name: 'preset-default',
                                params: {
                                    overrides: {
                                        removeViewBox: false,
                                    },
                                },
                            },
                        ],
                    },
                },
            },
        ],

Probably name: 'preset-default' resolves issues which you try to resolve by template?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably, I'll give it a try and update PR accordingly.

</head>
<body className='uui-theme-loveship'>
<AppView>{children}</AppView>
<Suspense>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any sense to use Suspense without fallback prop?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants