Closed hrbigelow closed 3 years ago
Hi all, in case anyone is interested, I found a solution. Following the advice from the svelte moderator there @conduitry, you just need to write a simple preprocessor that substitutes '{' and '}' with '{' and '&125;'. Then, the contents of the <d-math>
tags pass through and can be processed at load time after the svelte compiler does its thing.
See rollup.config.js
Has anyone experimented with using svelte v3 and actually used distill's custom
<d-math>
etc tags etc inside the .svelte files themselves? I would like to leverage the nice modularity of the .svelte files, but it doesn't work. I've looked through some of the submissions but I didn't see any that used this structure.Any help would be greatly appreciated! Thank you.
My project structure starts from:
$ npx degit sveltejs/template my_project
which gives:
I tried to edit
public/index.html
as:and then include tags like
<d-math>
insidesrc/App.svelte
like:But, when I run
npm run dev
, I get: