Skip to content

Commit

Permalink
use newer syntax (redwoodjs#3333)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtoar authored Sep 1, 2021
1 parent c39a37d commit dd342bd
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions packages/core/config/babel-preset.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/**
* This is the babel preset used in `create-redwood-app`
*/
const { extendDefaultPlugins } = require('svgo')

const { getPaths } = require('@redwoodjs/internal')

const packageJSON = require('../package.json')
Expand Down Expand Up @@ -171,22 +169,24 @@ module.exports = () => {
'inline-react-svg',
{
svgo: {
plugins: extendDefaultPlugins([
plugins: [
{
name: 'removeAttrs',
params: { attrs: '(data-name)' },
name: 'preset-default',
params: {
overrides: {
// @TODO confirm this is the right thing
// On my projects, this was needed for backwards compatibility
removeViewBox: false,
},
},
},
{
// @TODO confirm this is the right thing
// On my projects, this was needed for backwards compatibility
name: 'removeViewBox',
active: false,
},
{
// Otherwise having style="xxx" breaks
name: 'convertStyleToAttrs',
name: 'removeAttrs',
params: { attrs: '(data-name)' },
},
]),
// Otherwise having style="xxx" breaks
'convertStyleToAttrs',
],
},
},
],
Expand Down

0 comments on commit dd342bd

Please sign in to comment.