MDsveX + svelte@next (i.e. Snowpack)
See original GitHub issueHas anyone already tried out/figured out how to use MDsveX with svelte@next
using Snowpack as bundler as demoed in https://youtu.be/qSfdtmcZ4d0? I.e. start a project with npm init svelte@next my-app && cd my-app && npm i && npm i -D mdsvex
. Do I just import mdsvex
in svelte.config.js
and it should work?
const { mdsvex } = require(`mdsvex`)
module.exports = {
adapter: `@sveltejs/adapter-static`,
preprocess: mdsvex(),
extensions: [`.svelte`, `.svx`],
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
SvelteKit & MDSVEX Blogging - YuJin—@axionbuster
SvelteKit is a serverless toolkit for the Svelte framework, just like Next.js and Gatsby are that for React. In short, SvelteKit helps with ......
Read more >Svelte, a bright future with Snowpack
Echoing Richard Harris announcements in Svelte Summit 2020: Sapper 1.0 never gonna happen, the new Svelte Kit, Snowpack as build tool, ...
Read more >MDsveX - Adding Interactivity with Svelte Components in ...
Basically MDX for Svelte. This preprocessor allows you to use Svelte components in your markdown, or markdown in your Svelte components.
Read more >Newest 'svelte-3' Questions - Page 5 - Stack Overflow
I am trying to use mdsvex to create a markdown blog. I have installed the package using npx svelte-add@latest mdsvex. I then create...
Read more >Svelte Radio – Podcast - Podtail
Things about Svelte. Sometimes weekly, sometimes not. – Écoutez Svelte Radio instantanément sur votre tablette, téléphone ou navigateur, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Update: This appears to have nothing to do with mdsvex!
I commented out the msdvex pre-processor in my svelte.config.js and the problem persisted. A bit more poking around led me to the create_manifest_data function in @svelte/kit’s create_app.js file. Its first few lines are:
And it’s called in two places in @svelte/kit, one in index.js and one in index2.js. The first call looks like this:
And the second one looks like this:
In both cases, no second parameter is given to create_app.create_manifest_data, so there’s no way to override the
.svelte
extension. Currently, that is: the TODO comment strongly hints that that ability will be added sometime in the future. But for now, the reason you’re getting the “GET is not implemented for /test” errors or the 404s appears to be because svelte-kit doesn’t yet handle extensions other than.svelte
when it’s writing manifests, and with an incorrect manifest you get incorrect behavior.@DrMagPie yeah that most likely works for an import of e.g.
Foo.svx
, but how to do make it work with a[slug].svelte
where you inject a.svx
blog post file named like the slug as a<slot/>
? That’s how I had it with Sapper currently.