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
  • Merge requests
  • !7378

Update url-loader to 2.0.1

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/heyimalex/update_url_loader into master Jul 16, 2019
  • Overview 4
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: heyimalex

This closes #7359 (closed) by making IMAGE_INLINE_SIZE_LIMIT=0 actually disable image inlining.

We use url-loader's limit option to set the line at which images will be inlined, and we basically expose this option to our end users via the IMAGE_INLINE_SIZE_LIMIT environment variable. Most people using it want to disable inlining images all together (the major motivator for adding it at all was I think for strict CSP), and our documentation said setting the value to zero would do that. However, it did the opposite: url-loader treated zero as "no limit".

The update to 2.x fixes this; zero means nothing gets inlined. The other changes from the version bump shouldn't affect us:

  • minimum node version is 8.9.x, we already require 8.10.x
  • the limit was "greater than", is now "greater than or equal to"

Validated this change manually, checking whether the image was inlined at different vales of IMAGE_INLINE_SIZE_LIMIT, everything worked like a charm.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/heyimalex/update_url_loader