fix(compiler-dom): should bail stringification on runtime constant regardless of position

ref: vuejs/vite#157
This commit is contained in:
Evan You
2020-05-18 10:04:03 -04:00
parent 45c96a06aa
commit dd2bfb5a8f
4 changed files with 99 additions and 49 deletions

View File

@@ -161,10 +161,10 @@ describe('stringify static html', () => {
test('should bail on runtime constant v-bind bindings', () => {
const { ast } = compile(
`<div><div><img src="./foo" />${repeat(
`<div><div>${repeat(
`<span class="foo">foo</span>`,
StringifyThresholds.ELEMENT_WITH_BINDING_COUNT
)}</div></div>`,
)}<img src="./foo" /></div></div>`,
{
hoistStatic: true,
prefixIdentifiers: true,