Skip to content

importing svg breaks component in production.  #2669

Closed
@CoachThomLamb

Description

@CoachThomLamb

Ok first time posting an issue so be kind :)

Node version 7.9
npm 4.2
yarn 0.20.3
react scripts 0.9.5
Mac mac sierra ox10.12.3

When I run in development my app works fine, however when I switch to production any component that has an SVG like this:

import SvgIcon from './svgIcon.svg'
returns with the following error.

https://facebook.github.io/react/docs/error-decoder.html?invariant=105&args[]=HardwareSmartphone

When I remove the svg and replace with a png the component renders fine.

Please let me know if I need to answer anything else ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions