Skip to content

vvaravva/s3-remove-files-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

S3 Remove Files Plugin

Webpack plugin for remove files from s3.

Install

npm install --save-dev s3-remove-files-plugin

Usage

In your webpack.config.js

const S3RemoveFilesPlugin = require('s3-remove-files-plugin');

module.exports = {
    // ...
    plugins: [
        new S3RemoveAssetsPlugin({
            config: {
                accessKeyId: process.env.S3_CREDENTIALS_ACCESS_KEY_ID,
                secretAccessKey: process.env.S3_CREDENTIALS_SECRET_ACCESS_KEY,
                region: process.env.S3_REGION
            },
            params: {
                Bucket: process.env.S3_BUCKET,
                Prefix: process.env.S3_BASE_PATH + 'assets'
            },
            include: /\.(js|css|gz)/,
            var: 'BUILD_NUMBER', // variable name
            count: 5 // number of builds to save
        })
    ]
};

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published