Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong relative path for SASS background-image url in 1.12 on Windows #2758

Closed
pocesar opened this issue Mar 10, 2019 · 1 comment
Closed

Comments

@pocesar
Copy link
Contributor

pocesar commented Mar 10, 2019

馃悰 bug report

Parcel is incorrectly renaming the paths of background: url entries. works with 1.11, the path has no slashes

  • Image path: /images/hero-homepage-banner.jpg

  • /src/pages/landing.tsx

import React from 'react'
import './landing.scss'

// ...
  • /src/pages/landing.scss
.layout-full {
   background: url('../../images/hero-homepage-banner.jpg') no-repeat;
   background-size: cover;
}

馃帥 Configuration (.babelrc, package.json, cli command)

parcel serve ./src/index.html --https --port 443 --log-level 3 --public-url / --no-hmr

馃 Expected Behavior

Generated css file contains a path like url(/hero-homepage-banner.975cc93d.jpg)

馃槸 Current Behavior

Generated CSS is:

.ant-layout.layout-full {
  background: url(..\hero-homepage-banner.975cc93d.jpg) no-repeat ;
  background-size: cover;
}

馃拋 Possible Solution

馃敠 Context

Impossible to use

馃捇 Code Sample

馃實 Your Environment

Software Version(s)
Parcel 1.12.0
Node 11.10.0
npm/Yarn 6.9.0
Operating System Windows 10 x64
@pocesar pocesar changed the title Wrong relative path for SASS background-image url Wrong relative path for SASS background-image url in Windows Mar 10, 2019
@pocesar pocesar changed the title Wrong relative path for SASS background-image url in Windows Wrong relative path for SASS background-image url in 1.12 on Windows Mar 10, 2019
@mischnic
Copy link
Member

Fixed by #2740

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants