Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No longer working in Next.js 11 #11

Closed
mattjis opened this issue Jun 15, 2021 · 6 comments
Closed

No longer working in Next.js 11 #11

mattjis opened this issue Jun 15, 2021 · 6 comments

Comments

@mattjis
Copy link

mattjis commented Jun 15, 2021

I'm using version 1.1.3

The error is:

./vectors/logos/original.svg
TypeError: unsupported file type: undefined (file: undefined)
@KasperAndersson
Copy link

KasperAndersson commented Jun 15, 2021

I've encountered the same issue, after updating to Next 11.

next.config.js looks like this:

module.exports =
	plugins([
		[images, { exclude: path.resolve(__dirname, 'src/assets/svg') }],
		[reactSvg, { include: path.resolve(__dirname, 'src/assets/svg') }]
	],
	nextConfig
);

@abenz1267
Copy link

Seems to be related to Webpack 5.

@mattjis
Copy link
Author

mattjis commented Jun 18, 2021

@abenz1267 I don't think so. It worked fine in previous versions of Next with Webpack 5 enabled.

@abenz1267
Copy link

Try running with webpack 4, it works. SVGR has the same problem.

@KasperAndersson
Copy link

The issue is related to Next 11, vercel/next.js#26130

@mattjis
Copy link
Author

mattjis commented Jun 19, 2021

This issue is fixed in Next.js 11.0.1 which is currently in pre-release. You can update your package.json with "next": "^11.0.1-canary.5" if you're needing a fix asap.

@mattjis mattjis closed this as completed Jun 19, 2021
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

No branches or pull requests

3 participants