Open marapper opened 4 years ago
We use extract-loader to compose template files like this:
// index.js import template from '!file-loader!extract-loader!ref-loader!./template.soy'; // template.soy @ref(!ref-loader!./Part1.soy) @ref(!ref-loader!./Part2.soy) // Part1.soy {template .Part1} {foreach $key in keys($ij.pageItem.preferences)} {if matches($key, '^visible_.*$')} {/if} {/foreach} {/template} // Part2.soy {template .Part2} {/template}
After upgrade extract-loader to v5.2.0 whole code part after $ is not included in result file. Downgrade extract-loader to v5.0.1 only works fine.
$
e.g. produce
// template.soy {template .BackbaseModel} {foreach $key in keys($ij.pageItem.preferences)} {if matches($key, '^visible_.*$ {template .Part2} {/template}
I suppose it's regex-relative thing. Probably somewhat connected with #57 and #54 ()
src/extractLoader.js:175
should be
return content.replace(pattern, () => dependencyContent);
because replace callbacks ignore special sequences like $'
$'
We use extract-loader to compose template files like this:
After upgrade extract-loader to v5.2.0 whole code part after
$
is not included in result file. Downgrade extract-loader to v5.0.1 only works fine.e.g. produce
I suppose it's regex-relative thing. Probably somewhat connected with #57 and #54 ()