Created
March 22, 2022 09:05
-
-
Save fedek6/5dec18cfaaebff3f224934aaa3faedcc to your computer and use it in GitHub Desktop.
Disable SVGR (SVGO) prefixes in Rollup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ts from "rollup-plugin-ts"; | |
import { nodeResolve } from "@rollup/plugin-node-resolve"; | |
// import peerDepsExternal from "rollup-plugin-peer-deps-external"; | |
import svgr from "@svgr/rollup"; | |
import { terser } from "rollup-plugin-terser"; | |
import commonjs from "@rollup/plugin-commonjs"; | |
import externals from "rollup-plugin-node-externals"; | |
// import postcss from "rollup-plugin-postcss"; | |
// import autoprefixer from "autoprefixer"; | |
export default (packageJson) => { | |
return { | |
input: "src/index.ts", | |
output: [ | |
{ | |
file: packageJson.main, | |
format: "esm", | |
sourcemap: true, | |
}, | |
], | |
// external: ["@retrolove-games/ui-themes", "react"], | |
plugins: [ | |
// peerDepsExternal(), | |
externals(), | |
nodeResolve(), | |
commonjs(), | |
svgr({ | |
svgoConfig: { | |
plugins: [ | |
{ | |
name: "prefixIds", | |
active: false, | |
}, | |
], | |
}, | |
}), | |
ts(), | |
/* postcss({ | |
plugins: [autoprefixer()], | |
}), */ | |
terser(), | |
], | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment