-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
warnings on build #53
Comments
yeah, I know, they're always there, I've learned to live with it ;) ... Do you have any idea how to get rid of them? Probably disabling that specific type of warning 🤔 ... those props are NOT 'for external reference only', so they can't be a EDIT: I now remember being at this point several times in the past, those warnings can be disabled, but I've decided not to: sometimes (rare) they do warn me about props which could really be a
|
yeah best not ignore these warnings - and I can give you a PR if you like |
solves it. without testing this properly |
thanks, but there's no need for that, this is already fixed / changed in newer versions see: svelthree/src/components/Mesh.svelte Lines 478 to 492 in afc023b
The currently published version is super-old and was changed a lot, try the newest one, see: https://github.com/vatro/svelthree/tags Please keep in mind that newer versions of svelthree use svelte-accmod, means you'll have to patch original Svelte (>= 3.44.2) via |
The assignment separate from the definition squashes the error. |
Thanks, I'll take a look at it again, they're annoying and I would like to get rid of them too. What I don't like is the extra code "for nothing" 😕 ... hm... maybe there IS a more elegant solution? 🤔 |
Hm... it seems the "x was created without expected prop y" warning has been removed?! see REPL |
nope, it's still there, but only in the console <!-- Child.svelte -->
<svelte:options accessors />
<script>
// setting initial value of exported vars to some value or 'undefined' / 'null'
// removes the 'x was created without expected prop y' warning
export let foo = undefined
export let bar = null
export let baz = 1
let boo
// using exported vars (somehow) removes the 'has unused export property ...' warning
/*
foo = undefined
bar = null
baz = 1
*/
if(!foo && !bar) {
boo = baz + 1
console.log(boo) // 2
}
</script> possible solutions / syntax to get rid of the <script>
export let foobar = undefined
foobar = undefined
</script> or ... <script>
export let foobar = undefined
foobar = foobar
</script> or just ... <script>
export let foobar = undefined
foobar
</script> ... or use the accessor in a meaningful way inside component code. see also: sveltejs/svelte#5892 The interaction accessors (handlers) are currently being checked by the SvelthreeInteraction component like e.g.:
means we're not passing them to the SvelthreeInteraction component directly, maybe we should just do that? This would also remove the warning
|
Hi Tom! |
@flipkickmedia I'm going to fix / close this now. Please feel free to contribute in future! 👍 |
Some warnings during a build with webpack 5
package.json extract
The text was updated successfully, but these errors were encountered: