philicevic / mix-html-builder

A quick laravel mix extension to build up html templates from partials and layouts.
MIT License
19 stars 8 forks source link

Tags are truncated/moved in the build #20

Closed weblabio closed 3 years ago

weblabio commented 4 years ago

home.html

<include src="start.html" locals='{
    "pageTitle": "HomePage",
    "pageClass": "page-home"
}'></include>

<extends src="default.html">
    <block name="content">
        <h1>Welcome!</h1>
    </block>
</extends>

<include src="end.html"></include>

partials/start.html

<!doctype html>
<html lang="en">
<head>
    ....
    <title>PlushHouse » {{ pageTitle }}</title>
</head>
<body class="{{ pageClass }}">

partials/end.html

<script src="/js/app.js"></script>
</body>
</html>

Tags </body></html> are truncated/moved in the build home.html: image

Perhaps this is the result of the optimizer, is it possible to configure this behavior?

philicevic commented 3 years ago

Unfortunatly it seems that this is a behaviour of posthtml that i can't customize. But it should be better practice to close tags in the same partial where you opened them.