Nuxt reloading sometimes update icon lastMod timestamp
dawid-pstrak-rmtcfm-com opened this issue · 1 comments
Nuxt reloading sometimes update icon lastMod timestamp. Would be nice if there will be option to disable lastMod
timestamp, becuase when it gets updated, I have to remove it from git changed files
to not push all icons to repo again with just updated timestamp
Hi, I'm guessing you're using nuxt-svgicon instead of vue-svgicon?
(I searched the svgicon source code, but couldn't find anything named lastMod)
Actually, the build process of nuxt-svgicon is almost the same as that of vue-svgicon, but different.
Some processes, such as the handling of lastMod, are different.
If you are using nuxt-svgicon and suffering from lastMod, I suggest you prepare your own template.
Example
nuxt.config.js
{
// ...
modules: [
[
'nuxt-svgicon',
{
tpl: 'nuxt-svgicon.template.txt',
},
],
],
}
nuxt-svgicon.template.txt
/* eslint-disable */
/* tslint:disable */
// @ts-ignore
import icon from 'vue-svgicon'
icon.register({
'${name}': {
width: ${width},
height: ${height},
viewBox: ${viewBox},
data: '${data}'
}
})