Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parcel lowercasing Vue attributes #1123

Closed
andrewbanchich opened this issue Apr 2, 2018 · 1 comment · Fixed by #1316
Closed

Parcel lowercasing Vue attributes #1123

andrewbanchich opened this issue Apr 2, 2018 · 1 comment · Fixed by #1316
Labels

Comments

@andrewbanchich
Copy link

andrewbanchich commented Apr 2, 2018

🐛 bug report

I noticed that my logo component in Vue is huge when I run parcel index.html. I looked at both the Webpack output code and the Parcel output code and the only thing that was different was that Parcel caused my SVG's viewBox attribute to be all lowercase (viewbox) which breaks it (at least in the latest version of FireFox).

After testing it out some more, I noticed it doesn't change the capitalization when I remove the use elements and xlink.

🎛 Configuration (.babelrc, package.json, cli command)

{
	"presets": [
		["env", {
			"modules": false,
			"targets": {
				"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
			}
		}],
		"stage-2"
	],
	"plugins": [
		"transform-runtime"
	],
	"env": {
		"test": {
			"presets": ["env", "stage-2"],
			"plugins": ["istanbul"]
		}
	}
}
@andrewbanchich andrewbanchich changed the title Parcel lowercasing all Vue attributes Parcel lowercasing Vue attributes Apr 2, 2018
@Hammster
Copy link
Contributor

Hammster commented Apr 3, 2018

Can confirm this issue.

Input HTML:

<scriptViewBlock class="scriptview-block scriptview" @click="setSelection(object.Id)" v-bind:isLast="false" v-bind:isSelected="isSelected(object.Id)"></scriptViewBlock>

Parsed AST (isselected property name turned lowercase):

{
    "tag": "scriptViewBlock",
    "attrs": {
        "class": "scriptview-block scriptview",
        "@click": "setSelection(object.Id)",
        "v-bind:islast": "false",
        "v-bind:isselected": "isSelected(object.Id)"
    }
}

Result HTML:

<scriptViewBlock class="scriptview-block scriptview" @click="setSelection(object.Id)" v-bind:islast="false" v-bind:isselected="isSelected(object.Id)"></scriptViewBlock>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants