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
Sapper Error - TypeError: _components_Icon_html__WEBPACK_IMPORTED_MODULE_0__.default.register is not a function #221
Comments
I haven't actually tested this with sapper, I'll have a look - thanks |
It looks like |
@RobBrazier Sorry about the commit spam. I tried a few approaches to get it working in SSR, but could not seem to figure out how to keep To get around this issue, I call export function register__chevron_down(Icon) {
if (Icon.icons['chevron-down']) return
Icon.register({ 'chevron-down': { width: 1792, height: 1792, paths: [{ d: 'M1683 808l-742 741q-19 19-45 19t-45-19l-742-741q-19-19-19-45.5t19-45.5l166-165q19-19 45-19t45 19l531 531 531-531q19-19 45-19t45 19l166 165q19 19 19 45.5t-19 45.5z' }] } })
} |
@RobBrazier Any thoughts? Looks like @btakita fixed it. |
I haven't had a chance to look at it yet, I'll try and give it a go over the weekend, but I'm getting an error from the svelte plugin when trying to use the getter method
@btakita did you manage to get anywhere in the end? I see you had another go early this month. Is this issue just on any sapper application, no particular requirements? |
I've created a fresh Sapper application just to determine how far from working this project might be. Simply including the Icon component on a page causes the following stacktrace: 500
<Icon> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules
Error: <Icon> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules
at validateSsrComponent (webpack:///./node_modules/svelte/shared.js?:1009:9)
at Object.Index._render (webpack:///./src/routes/index.html?:49:120)
at Object.Layout._render (webpack:///./src/routes/_layout.html?:45:276)
at Object.Layout.render (webpack:///./src/routes/_layout.html?:23:20)
at Promise.all.catch.then.preloaded (webpack:///./__sapper__/server.js?:2193:58)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:182:7) |
Really sorry for the delay 😞. Support has been added for svelte 3 now in |
Closing as I have tested this with sapper now - all working |
@RobBrazier moved the comment to separate issue - #506 |
When importing an icon:
The following error occurs:
The text was updated successfully, but these errors were encountered: