8000 HTML preprosessor support · Issue #41 · sveltejs/svelte · GitHub
[go: up one dir, main page]

Skip to content
HTML preprosessor support #41
Closed
Closed
@maraisr

Description

@maraisr

I know it's very subjective - but I'm a huge advocate of Pug or JSX, anything that can help me write HTML!

Would be kind of nice to be able to write my templates with Pug, and have Svelte interpret that, whether or not it's an extra build step or not.

Example:

HelloWorld.pug

.my-app
   h1 {{hello}}

And being able to import that into a HelloWorld.js file

import HelloWorld from './HelloWorld.pug';

new HelloWorld({
   target: document.body,
   data: {
      hello: 'World'
   }
});

My only concern is writing JavaScript in Pug is terrible, so like isolate the template element to Pug and the JS, events, handlers, etc... to a JS file.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0