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
The error does only occur if I configure posthtmlExpressionsOptions.
I think the problem is in https://github.com/posthtml/posthtml-include/blob/v1.7.2/lib/index.js line 35 where posthtmlExpressionsOptions.locals are copied over the partial's locals and then stored in posthtmlExpressionsOptions.locals. In the next walk-through posthtmlExpressionsOptions.locals contains the variables from the first run (in my case "Hello") and copies them over the partial's locals (in my case "Hello" over "World").
Maybe it was better to work with a (deep) copy of options.posthtmlExpressionsOptions (in lib/index.js line 23) and leave the original posthtmlExpressionsOptions unchanged?
The text was updated successfully, but these errors were encountered:
I have a problem since the last release using posthtml-include with parceljs.
My .posthtmlrc:
I have two HTML files, index.html:
and partial.html:
Running parcel with posthtml-include 1.7.1 generates (as expected):
But with posthtml-include 1.7.2 I get:
The error does only occur if I configure posthtmlExpressionsOptions.
I think the problem is in https://github.com/posthtml/posthtml-include/blob/v1.7.2/lib/index.js line 35 where posthtmlExpressionsOptions.locals are copied over the partial's locals and then stored in posthtmlExpressionsOptions.locals. In the next walk-through posthtmlExpressionsOptions.locals contains the variables from the first run (in my case "Hello") and copies them over the partial's locals (in my case "Hello" over "World").
Maybe it was better to work with a (deep) copy of options.posthtmlExpressionsOptions (in lib/index.js line 23) and leave the original posthtmlExpressionsOptions unchanged?
The text was updated successfully, but these errors were encountered: