npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

create-react-app-s3-uploader

v1.0.1

Published

webpack plugin ( for create-react-app ), when source build on production, this plugin upload static directory to aws s3 bucket

Downloads

3

Readme

Create React App S3 Uploader

create-react-app-s3-uploader는 webpack 플러그인이며 create-react-app 환경에서 사용을 목적으로 제작하였습니다. production 환경에서 react를 빌드하였을 시, static 디렉토리의 소스들을 aws s3의 버킷에 업로드 해줍니다.

create-react-app-s3-uploader is webpack plugin. (for create-react-app). When react builded on production, this plugin upload static directory to aws s3 bucket

install

npm install --save create-react-app-s3-uploader

usage

가장 우선, create-react-app project에서 npm eject를 실행시켜줘야 합니다. first of all, you shoud run npm eject in your create-react-app project

webpack.config.prod.js

const CreateReactAppS3Uploader = require("create-react-app-s3-uploader");

module.exports = {
    plugins: [
        new CreateReactAppS3Uploader({
            accessKeyId: {AWS ACCESS KEY },
            secretAccessKey: { AWS SECRET KEY },
            buildPath: paths.appBuild,
            region: "ap-northeast-2",
            bucket: "create-react-app-s3-uploader",
        })
    ]
};

CreateReactAppS3Uploader Parameters

|Name|Type|Required|Description| |:--:|:--:|:-----:|:----------| |accessKeyId|{String}|Required|AWS Access Key| |secretAccessKey|{String}|Required|AWS Secret Key| |buildPath|{String}|Required|create-react-app build directory path| |region|{String}|Required|AWS S3 Region| |bucket|{String}|Required|AWS S3 Bucket| |key|{String}|Optional|If you set this param, you can upload to specific directory in your s3 bucket| |acl|{String}|Optional|AWS S3 ACL, default public-read| |cloudfront|{String}|Optional|S3's CloudFront Domain.| |replaceHtml|{boolean}|Optional|default false. If you set to true, automatically change index.html's css & js's src to uploaded url|

Example

Example S3 live demo gif ( upload to s3 )

Example CloudFront live demo gif ( upload to cloudfront )

Reference