Skip to content

Incorrect svg filepath #2736

@wesflynn

Description

@wesflynn

🐛 bug report

After updating to the latest version of Parcel (1.12.0) svg images no longer load properly due to the wrong paths being generated.

🎛 Configuration (.babelrc, package.json, cli command)

{
  "presets": ["@babel/env", "@babel/react"],
  "plugins": ["@babel/plugin-proposal-class-properties","react-hot-loader/babel","@babel/plugin-transform-runtime"]
}

🤔 Expected Behavior

Generated links should look like:

<img alt="logo" src="./logo_color.7e674228.svg" class="Component-logo-64">

😯 Current Behavior

Links generated by the newest version of Parcel:

<img alt="logo" src="/....logo_color.7e674228.svg" class="Component-logo-64">

💁 Possible Solution

🔦 Context

💻 Code Sample

import logo from "./Images/logo_color.svg";
...
<img alt={"logo"} src={logo} className={classes.logo} />

🌍 Your Environment

Software Version(s)
Parcel
Node
npm/Yarn
Operating System

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions