parcel icon indicating copy to clipboard operation
parcel copied to clipboard

Pug breaks build if reference to host page is made

Open djr319 opened this issue 2 years ago • 1 comments

If a pug file contains an anchor link to the calling file, the build will fail. Presumably because of a circular dependency.

This also means that "hash links" <a href="thispage.html#section2"> will break the build as well.

Desired behaviour: Build completes successfully, with functioning hash links, and self-referencing anchors. As an aside: The dev server will give the desired behaviour.

Originally posted by @djr319 in https://github.com/parcel-bundler/parcel/discussions/8081

djr319 avatar May 12 '22 21:05 djr319

I'm re-visiting this problem. I never did find a solution. Seems like Pug is just not working for me.

I followed the example on https://parceljs.org/languages/pug/ , except that I don't have a .pugrc file.

Any help appreciated.

Minimum example: https://github.com/djr319/bughunt/

djr319 avatar Aug 27 '22 12:08 djr319

Problem is more generic, refer to: https://github.com/parcel-bundler/parcel/issues/8219

djr319 avatar Oct 01 '22 16:10 djr319