How to use @svgr/rollup - 3 common examples

To help you get started, we’ve selected a few @svgr/rollup examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pingcap / tidb-dashboard / ui / packages / rollup.config.base.js View on Github external
exports: 'named',
        sourcemap: true,
      },
    ],
    plugins: [
      external({
        includeDependencies: true,
      }),
      // https://github.com/egoist/rollup-plugin-postcss/issues/110
      // https://github.com/cisen/blog/issues/295
      postcss({
        extensions: ['.css', '.less'],
        use: [['less', lessLoaderConfig]],
      }),
      url(),
      svgr(),
      yaml(),
      resolve(),
      typescript({
        rollupCommonJSResolveHack: true,
        clean: true,
        transformers: [
          () => ({
            before: transformer,
          }),
        ],
      }),
      commonjs(),
    ],
  }
}
github umijs / father / packages / father-build / src / getRollupConfig.ts View on Github external
function getPlugins(opts = {} as { minCSS: boolean; }) {
    const { minCSS } = opts;
    return [
      url(),
      svgr(),
      postcss({
        extract: extractCSS,
        inject: injectCSS,
        modules,
        minimize: !!minCSS,
        use: [
          [
            'less',
            {
              plugins: [new NpmImport({ prefix: '~' })],
              javascriptEnabled: true,
              ...lessInRollupMode,
            },
          ],
          [
            'sass',
github priceline / design-system / packages / icons / rollup.config.js View on Github external
const svgr = require('@svgr/rollup').default
const svgSprite = require('rollup-plugin-svg-sprite')

const config = require('../../rollup.config')

config.plugins.push(svgr())
config.plugins.push(
  svgSprite({
    outputFolder: 'dist/public'
  })
)

module.exports = config

@svgr/rollup

SVGR Rollup plugin.

MIT
Latest version published 1 year ago

Package Health Score

62 / 100
Full package analysis

Popular @svgr/rollup functions