Closed franktopel closed 7 years ago
@franktopel Hi, It is no problem use the svg which you provide, and I wonder why you use svgo.json? vue-svgicon will use it's own svgo config, will not load any another svgo config. Do you have your own icon template file?
I am not using a custom icon template.
I am using svgo.json for this gulp task:
gulp.task('svg', () =>
gulp.src(paths.src.svg + '*.svg')
.pipe(imagemin([imagemin.svgo(options[env].img.svg)]))
.pipe(gulp.dest(paths.dest.svg))
)
You are right, this has supposedly nothing to do with the current problem. Fact remains that vsvg -s ./src/img/svg -t ./vue/assets/js/compiled-svg-icons
results in the above falty quotation characters in the generated close.js file. And this only happens since V1.2.6, so there must be something wrong in the part of the code that generates the Javascript files from the svg images.
See it generates wrong quotation characters after data: ` which should be either " or '
`` is es6 template literals, if you not use es6, please use your own icon template
I am using ES6, but uglify.js
seems to be unable in its default configuration to handle this. And babel doesn't seem to translate it either, even though I'm using es2015-ie
preset (which should include all transformations required down until IE 9).
Please check your config is include the generated js file
Pardon?
The generated js file is quoted in my initial post.
I close this issue. If you still reproduce this bug, you can reopen it.
This is what generating my icon with 1.2.6 instead of 1.2.3 suddenly produces (and breaks my build process, obviously):
See it generates wrong quotation characters after
data:
` which should be either " or 'Pls check, have downgraded to 1.2.3 and the problem is gone.
This is my command to generate the icons:
Here's my
svgo.json
:This is the svg that fails to generate properly: