New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

vite-plugin-aws3

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-aws3

This plugin will deploy assets to AWS (S3 & Cloudfront)

latest
npmnpm
Version
0.3.0
Version published
Maintainers
1
Created
Source

This plugin will upload all built assets to s3.

This package was heavily inspired by vite-plugin-s3

Install Instructions

$ npm i vite-plugin-aws3

$ yarn add vite-plugin-aws3
Import vite-plugin-aws3 in your vite config file and add it as a vite plugin.
import viteAws from 'vite-plugin-aws3';

export default defineConfig({
    plugins: [
        viteAws({
            s3: {
                profile: 'my_aws_profile',
                region: 'us-east-1',
                bucket: 'my-website-bucket',
            },
            cloudFront: {
                distributionId: 'E3IXXXXXXXXXX',
                paths: ['/*'],
            },
        }),
    ]
});
Config Example
viteAws({
    exclude: /.*\.img/,
    include: /.*\.js$/,
    uploadEnabled: !!process.env.UPLOAD_ENABLED,
    s3: {
        profile: 'my_aws_profile',
        region: 'us-east-1',
        bucket: 'my-website-bucket',
    },
    cloudFront: {
        distributionId: 'E3IXXXXXXXXXX',
        paths: ['/*'],
    },
})

Options

OptionTypeDefaultDescription
uploadEnabledBooleantrueThis setting can be used to disable or enable the uploading of assets
excludeStringA Regex Pattern to match for excluded content
includeStringA Regex Pattern to match for included content. Behaves the same as exclude

Example Usage

$ UPLOAD_ENABLED=true yarn prod

Keywords

vite

FAQs

Package last updated on 23 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts