Sha256: 9fdeedea920e65cc0857b18e0681fc119a72dd068ccf666463f87394de95cab0
Contents?: true
Size: 494 Bytes
Versions: 2
Compression:
Stored size: 494 Bytes
Contents
/* eslint global-require: 0 */ /* eslint import/no-dynamic-require: 0 */ const { moduleExists } = require('../utils/helpers') module.exports = { test: /\.svg$/i, type: 'asset/inline', generator: { dataUrl: (content) => { let optimisedContent = content if (moduleExists('mini-svg-data-uri')) { const svgToMiniDataURI = require('mini-svg-data-uri') optimisedContent = svgToMiniDataURI(content.toString()) } return optimisedContent } } }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
webpacker-6.0.0.beta.1 | package/rules/svg.js |
webpacker-6.0.0.beta | package/rules/svg.js |