Comments (7)
I tried using the pnpm override fix in package.json
but it didn't work. I was playing around with it some more and it seems like it's actually {...props}
that is affecting it. I can actually use {@render children()}
normally but as soon as I pass in {...props}
, it gives the error ParseError: Unexpected character '@'
.
// This fails.
<script lang="ts">
import type { Snippet } from 'svelte';
let { children, ...props } = $props<{
children: Snippet;
}>();
</script>
<button {...props}>
{@render children()}
</button>
// This works.
<script lang="ts">
import type { Snippet } from 'svelte';
let { children, ...props } = $props<{
children: Snippet;
}>();
</script>
<button>
{@render children()}
</button>
from monorepo.
I made an example SvelteLab environment, it will work if you remove {...props}
or you remove paraglide({})
inside of vite.config.js
plugins:
from monorepo.
It's probably using the Svelte 4 compiler to try and compile the svelte 5 code. I'll try to update it so that it uses whatever svelte version is used in the current project.
from monorepo.
Jup, was that. I'll turn the adapter's dependency on svelte
into a peerDependency
.
If you are using pnpm
you can immediately fix your issue by adding the following to your package.json
"pnpm": {
"overrides": {
"svelte": "$svelte"
}
},
This will force any package in your dependency graph to use your version of svelte
from monorepo.
This code is working perfectly fine for me. Do you have a repo I could take a look at?
from monorepo.
"pnpm": { "overrides": { "svelte": "$svelte" } },
this + pnpm i worked for me
from monorepo.
Oh you're right, I guess it was due to peerDependency
issues with Svelte after all. I didn't realize that it wouldn't work before with just adding the pnpm override
. Now that I tried deleting node_modules
and then doing a fresh install with pnpm i
, it now works properly. Thanks for the fix. 😄
from monorepo.
Related Issues (20)
- add "use this action" on marketplace/readme of ninja github action HOT 2
- add "contribute (via Sherlock 🕵️♂️)" to ninja action HOT 5
- `@inlang/cross-sell-sherlock` package
- replace custom paraglide sherlock cross soll logic with `@inlang/cross-sell-sherlock` HOT 2
- cross sell sherlock from fink HOT 1
- `@inlang/cross-sell-ninja` package HOT 3
- High volume of lint report events consume excessive resources and lead to performance issues HOT 2
- Errors for loadProject settings get swallowed HOT 1
- Enable mock translation in CI for more tests
- Add "alias" label above aliases in the Fink UI. HOT 1
- Sentry error logging for sdk HOT 3
- improve sherlock appearance in vscode HOT 2
- Aliases and human IDs - TODOs remaining ater initial release of experminental aliases PR HOT 1
- `createNewProject()` v1 HOT 3
- Broken link to the root of the website on SvelteKit HOT 3
- Make Missing-Translation Lint rule less aggressive HOT 3
- [bug] @inlang/paraglide-js `1.2.9` has breaking missing dependency HOT 3
- i want new feature. test for linear integration HOT 5
- Issues moved to issue tracker 'repos'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from monorepo.