Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #4707
Closed
Open
Issue created Jun 30, 2018 by Administrator@rootContributor

CRA 2.0: urls in static files not correct when homepage="."

Created by: bradfordlemley

Is this a bug report?

Yes

Steps to Reproduce

  1. Use react-scripts@2.0.0-next.3e165448
  2. In app's package.json, set "homepage": "."
  3. In App.css, add a url to a static file, e.g., background-image: url(./logo.svg)
  4. yarn build

Expected Behavior

build/static/css/main.[hash].chunk.css should have: background-image:url(../../static/media/logo.5d5d9eef.svg)

Actual Behavior

build/static/css/main.[hash].chunk.css has: background-image:url(static/media/logo.5d5d9eef.svg)

Assignee
Assign to
Time tracking