We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Operating System: Platform: darwin Arch: x64 Version: Darwin Kernel Version 21.6.0: Mon Aug 22 20:17:10 PDT 2022; root:xnu-8020.140.49~2/RELEASE_X86_64 Binaries: Node: 18.12.1 npm: 9.1.2 Yarn: 1.22.19 pnpm: 7.13.4 Relevant packages: next: 13.0.4-canary.5 eslint-config-next: 13.0.3 react: 18.2.0 react-dom: 18.2.0
No response
next dev
Web component is not bundled, unless wrapped in client only component.
When using web component as is, it fails to render because bundle served to browser does not include web component.
Failing component example:
import { Icon } from "@iconify-icon/react"; export default function Index() { return ( <div className="error"> <Icon icon="ic:round-home" width={96} height={96} /> </div> ); }
However, when wrapped in client only component, it works:
import IconWrapper from "@/components/IconWrapper"; export default function Index() { return ( <div className="success"> <IconWrapper icon="ic:round-home" width={96} height={96} /> </div> ) }
and wrapper:
"use client"; import { Icon } from "@iconify-icon/react"; export default Icon;
Those examples are almost identical, but one works, one doesn't.
Expected web component code to be included in bundle.
https://github.com/cyberalien/iconify-next13-bug
http://localhost:3000/error
http://localhost:3000/success
If you do see icon when visiting /error route, refresh page in browser to see empty page.
/error
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Verify canary release
Provide environment information
Operating System:
Platform: darwin
Arch: x64
Version: Darwin Kernel Version 21.6.0: Mon Aug 22 20:17:10 PDT 2022; root:xnu-8020.140.49~2/RELEASE_X86_64
Binaries:
Node: 18.12.1
npm: 9.1.2
Yarn: 1.22.19
pnpm: 7.13.4
Relevant packages:
next: 13.0.4-canary.5
eslint-config-next: 13.0.3
react: 18.2.0
react-dom: 18.2.0
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
next dev
Describe the Bug
Web component is not bundled, unless wrapped in client only component.
When using web component as is, it fails to render because bundle served to browser does not include web component.
Failing component example:
However, when wrapped in client only component, it works:
and wrapper:
Those examples are almost identical, but one works, one doesn't.
Expected Behavior
Expected web component code to be included in bundle.
Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/cyberalien/iconify-next13-bug
To Reproduce
next dev
.http://localhost:3000/error
, see empty page. It supposed to render icon.http://localhost:3000/success
, see correct page.If you do see icon when visiting
/error
route, refresh page in browser to see empty page.The text was updated successfully, but these errors were encountered: