2.1.0 • Published 4 years ago

vite-plugin-rehost v2.1.0

Weekly downloads
16
License
MIT
Repository
github
Last release
4 years ago

vite-plugin-rehost

npm Code style: Prettier Donate

Self-hosted resources from index.html

Any <link rel="stylesheet"> and <script> elements that point to external URLs are fetched at build time and saved to the outDir to be self-hosted. The resources will have a content hash in their name, so Cache-Control: immutable can be used.

Within self-hosted .css files, any url() expressions that point to external URLs are also fetched and saved to the outDir to be self-hosted.

Note: This plugin depends on #1675

 

Usage

yarn add vite-plugin-rehost -D

Within your vite.config.js file:

import rehost from 'vite-plugin-rehost'

export default {
  plugins: [
    rehost(),
  ]
}
2.1.0

4 years ago

2.0.7

4 years ago

2.0.9

4 years ago

2.0.8

4 years ago

2.0.6

4 years ago

2.0.3

4 years ago

2.0.5

4 years ago

2.0.4

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago