You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Using the basic example of both Svelte and svelte-preprocess in their docs, I set up only the pug preprocessor to process in my App.svelte file. However, the content inside the template tag is not processed, but everything outside the template tag is processed via the pug preprocessor.
To Reproduce
download the basic Svelte example repo
set up the basic svelte-preprocess example in rollup.config.js with import { pug } from 'svelte-preprocess';
svelte({
// enable run-time checks when not in production
dev: !production,
// we'll extract any component CSS out into
// a separate file - better for performance
preprocess: [
pug(),
],
css: css => {
css.write('public/build/bundle.css');
}
}),
In my App.svelte file I have a following simple code:
<template lang="pug">
h1 testing h1 inside template tag
</template>
h2 testing h2 outside template tag
In the browser, only the "testing h2 outside template tag" is seen and styled as h2. Thus implying that the pug compiler ignores the tag and preprocesses outside of it.
Expected behavior
The pug compiler should compile only within the context of tag
Information about your project:
mac OS Catalina
svelte-preprocess version 4.0.10
Rollup
The text was updated successfully, but these errors were encountered:
Hey @jakubferenc 👋 The.<template> wrapper feature is only available if you use the automatic preprocessor (see the note here). If you want to use the standalone pug preprocessor, you need to write your whole component in pug
Describe the bug
Using the basic example of both Svelte and svelte-preprocess in their docs, I set up only the pug preprocessor to process in my App.svelte file. However, the content inside the template tag is not processed, but everything outside the template tag is processed via the pug preprocessor.
To Reproduce
import { pug } from 'svelte-preprocess';
In my App.svelte file I have a following simple code:
In the browser, only the "testing h2 outside template tag" is seen and styled as h2. Thus implying that the pug compiler ignores the tag and preprocesses outside of it.
Expected behavior
The pug compiler should compile only within the context of tag
Information about your project:
svelte-preprocess
version 4.0.10The text was updated successfully, but these errors were encountered: