Pug is a templating language that compiles to HTML. Parcel supports Pug automatically using the
@parcel/transformer-pug plugin. When a
.pug file is detected, it will be installed into your project automatically.
Pug is compiled to HTML and processed as described in the HTML docs.
h1 Hello Pug!
Pug is a terse and simple templating language with a
strong focus on performance and powerful features.
Pug may be used as an entry to Parcel just like HTML:
bundle-text: scheme. See Bundle inlining for details.
import html from 'bundle-text:./index.pug';
document.body.innerHTML = html;
Pug can be configured using a
pug.config.js file. See the Pug API Reference for details on the available options.
You can define a
locals object in your Pug config, and this will be provided to your Pug templates when rendering.