Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Mar 17, 2021. It is now read-only.
This repository was archived by the owner on Mar 17, 2021. It is now read-only.

option to prefix URLs with file:// #215

Copy link
Copy link

Description

@trusktr
Issue body actions
  • Operating System: N/A
  • Node Version: N/A
  • NPM Version: N/A
  • webpack Version: N/A
  • url-loader Version: 4

Feature Proposal

Maybe something like

fileUrl: true

Feature Use Case

Allows URLs to be imported as file:// URLs. Currently we get an absolute path in the file system when the file is above the limit. In some cases (f.e. NW.js or Electron) it would be simple if the path included file:// so that it works fine with web APIs out of the box.

F.e., instead of

import * as svgUrl from './some.svg'
<img src={"file://" + svgUrl} />

we could write

import * as svgUrl from './some.svg'
<img src={svgUrl} />

which makes the code more portable.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.