-
Notifications
You must be signed in to change notification settings - Fork 184
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
Doesn't work with ParcelJS #7
Comments
Hey @antony! Ah, I haven't used Parcel extensively so I didn't consider that would be a problem when I created the components. The reason why the components are not exported as your second example is because that would require I am following the uncompiled templates export RFC and will move to that when it's ready. |
I have the same issue, with Webpack rather than Parcel. The "fix" in the issue you linked above didn't work for me... |
Hey @ItalyPaleAle! You're right. The issue I linked to in my comment is not implemented yet, so there is no satisfying solution to this problem as of yet. |
My (definitely sub-optimal) workaround was to download the source code from this repo into a “vendor” folder, then install the two dependencies of svelte-routing in the local module. |
I think this might be resolved by using |
@konsumer yes - as per my original comment, this will fix it. There is a concept of a 'svelte' export already @EmilTholin - simply specify the 'svelte' attribute on |
Could you expand on that solution for Webpack, please? How do you "install the two dependencies of svelte-routing in the local module"? Thanks. |
Well, it’s like back in the days when package managers didn’t exist :) I downloaded a ZIP of this repo, removed all unnecessary files and put the source into vendor/svelte-router. Svelte Router has a dependency too, which I’ve added to my package.json. Then, I import Svelte Router with a normal |
Sorry for keeping you waiting for so long. With the release of import { Router, Route, Link } from "svelte-routing"; |
I'm trying to use this in a project I build with
parcel
andparcel-svelte-plugin
. Unfortunately due to the way parcel automatically determines how to parse files, theparcel-svelte-plugin
relies on.svelte
file extensions for components, hence:won't work, as the html files will be treated as plain html.
Is there a reason that
NavLink
andRoute
are exported like this? Could they instead be exports?Thanks, Antony
The text was updated successfully, but these errors were encountered: