Skip to content

Ability to remove leading "/" from built index.html src/href tags #437

@garrett-thompson

Description

@garrett-thompson

Do you want to request a feature or report a bug?
Feature

What is the current behavior?
Running npm run build results in hardcoded src and href values with a leading '/'

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?
I'd like to be able to remove the '/' so that I can access my assets from the same directory the app is served from, not the origin directory.

Example:
App served from https://www.domain.com/folder1/path/app/index.html
App tries to pull assets from https://www.domain.com/
I want them to be pulled from https://www.domain.com/folder1/path/app/

It can be achieved by simply removing the leading '/' from the src or href in the html, but I'd like to make this part of my build process.

If this is a feature request, what is motivation or use case for changing the behavior?

Please mention other relevant information.

  • node version
  • npm version
  • Operating system

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions