Skip to content

A snowpack plugin that can help you process files in the transform lifecycle hooks.

License

Notifications You must be signed in to change notification settings

AuroraHuiyan/snowpack-plugin-files-handler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

snowpack-plugin-files-handler

A snowpack plugin that can help you process files in the transform lifecycle hooks.

Install

use npm or yarn

npm i snowpack-plugin-files-handler --save-dev

yarn add snowpack-plugin-files-handler --dev

Example to use

you can use it in snowpack configuration file.

/**
    target: write file path you want to process.
    handler: the function to process the file, accept the original content and need to return a new content.
    exact: choose to exactly match file path
*/

export default {
  plugins: [
      [
          'snowpack-plugin-files-handler',
          {
              opts: [
                  {
                      target: String,
                      handler: Function
                      exact: Boolean
                  }
              ]
          }
      ]
  ]
};

About

A snowpack plugin that can help you process files in the transform lifecycle hooks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published