Skip to content
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

Support for {@const ...} #3

Open
tivac opened this issue Apr 15, 2022 · 0 comments
Open

Support for {@const ...} #3

tivac opened this issue Apr 15, 2022 · 0 comments

Comments

@tivac
Copy link

tivac commented Apr 15, 2022

I just used patch-package to add this support, but figured it might be useful for other folks. Only very lightly tested, but seems to work well on a simple case.

diff --git a/node_modules/svelte-trim/out/cjs/index.js b/node_modules/svelte-trim/out/cjs/index.js
index 08fbc2b..fed3c55 100644
--- a/node_modules/svelte-trim/out/cjs/index.js
+++ b/node_modules/svelte-trim/out/cjs/index.js
@@ -25,7 +25,7 @@ const blockTypes = [
     'CatchBlock',
     'KeyBlock'
 ];
-const atDirectiveTypes = ['DebugTag', 'RawMustacheTag'];
+const atDirectiveTypes = ['DebugTag', 'RawMustacheTag', 'ConstTag'];
 function isNodeType(node, someType) {
     if (someType.includes(node.type)) {
         return true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant