Skip to content

api.render leaves the rendered file ending if new version is shorter #2275

Closed
@jacekkarczmarczyk

Description

@jacekkarczmarczyk

Version

3.0.0

Reproduction link

https://github.com/jacekkarczmarczyk/vue-cli-plugin-render-bug

Template content:

<%_ if (long) { _%>
AAAAA
<%_ } else { _%>
BB
<%_ } _%>

Node and OS info

yarn, node 8.13, windows

Steps to reproduce

git clone git@github.com:jacekkarczmarczyk/vue-cli-plugin-render-bug.git
vue create render-bug
cd render-bug
yarn add ../vue-cli-plugin-render-bug

# Select "yes" in the first prompt
vue invoke render-bug

# Select "No" in the first prompt
vue invoke render-bug

What is expected?

./src/plugin.js content should be:

BB

What is actually happening?

./src/plugin.js content is:

BB
AA

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions