Skip to content

mkg20001/parcel-transformer-strip-index-html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

parcel-transformer-strip-index-html

Strips /index.html from URLs in parcel builds

What it does

It turns stuff like this

<a href="/my-page/index.html"></a>

...into stuff like this

<a href="/my-page/"></a>

NOTE: Automatic stripping is only done when HMR is disabled, since this otherwise breaks the URLs

Usage

Add parcel-transformer-strip-index-html as a transformer for parcel by adding this to your .parcelrc

{
  "transforms": {
    "*.html": [
      "parcel-transformer-strip-index-html"
    ]
  }
}

About

Strips /index.html from URLs in parcel builds

Resources

Stars

Watchers

Forks

Packages

No packages published