Skip to content

Feature request: exportEachAs option #15

Open
@kylemh

Description

@kylemh

I'm making a React SVG icon library which uses rollup and the react-svg-loader to automatically resolve SVG imports into a ready-to-go React SVG component. The module mapper file looks like this:

import { ReactSVGElement } from 'react';

const _Icon: ReactSVGElement = require('./svgs/some-icon.svg');
// dozens more

export {
  _Icon as Icon,
  // dozens more
};

I hate all these extra steps to properly export each icon a typesafe ReactSVGElement. I would love to use your bundler to export everything as the same type, but not as one module - I want to maintain the tree-shakeability.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions