{"id":28220986,"url":"https://github.com/olsgreen/webpack-s3-pusher","last_synced_at":"2025-06-10T11:32:52.722Z","repository":{"id":48415691,"uuid":"144377398","full_name":"olsgreen/webpack-s3-pusher","owner":"olsgreen","description":"Pushes your packed assets to your S3 compatible buckets, no more, no less.","archived":false,"fork":false,"pushed_at":"2021-11-16T21:56:55.000Z","size":24,"stargazers_count":12,"open_issues_count":4,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-18T04:16:38.030Z","etag":null,"topics":["deploy","do-spaces","laravel-mix","mix","s3","s3-bucket","webpack","webpack-s3-pusher"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olsgreen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-11T10:46:44.000Z","updated_at":"2022-10-16T09:48:03.000Z","dependencies_parsed_at":"2022-08-24T08:01:19.904Z","dependency_job_id":null,"html_url":"https://github.com/olsgreen/webpack-s3-pusher","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olsgreen%2Fwebpack-s3-pusher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olsgreen%2Fwebpack-s3-pusher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olsgreen%2Fwebpack-s3-pusher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olsgreen%2Fwebpack-s3-pusher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olsgreen","download_url":"https://codeload.github.com/olsgreen/webpack-s3-pusher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olsgreen%2Fwebpack-s3-pusher/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":258642434,"owners_count":22734668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deploy","do-spaces","laravel-mix","mix","s3","s3-bucket","webpack","webpack-s3-pusher"],"created_at":"2025-05-18T04:16:36.116Z","updated_at":"2025-06-10T11:32:52.706Z","avatar_url":"https://github.com/olsgreen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webpack-s3-pusher\n\nA webpack plugin that pushes your packed assets to S3 compatible bucket, no more, no less.\n\n_For webpack \u003c 4 support use version 1.x_\n\n## Installation\n\n```bash\nnpm install webpack-s3-pusher\n```\n\n## Configuration\n\n```javascript\nnew S3PusherPlugin({\n    key: 'your_key',\n    secret: 'your_secret',\n\n    // If you are using Amazon S3 then only set region.\n    // However if you are using some other provider then set only endpoint.\n    // Region and endpoint both should not be set together.\n\n    region: 'us-west-2',\n    // endpoint: 'https://sgp1.digitaloceanspaces.com,\n\n    bucket: 'bucket_name',\n    acl: 'public-read', // If you are not using a bucket with default public permissions\n    cache: 'max-age=602430', // Set Cache-Control header\n    prefix: 'assets', // Publish to a folder instead of root directory\n\n    include: '/.*\\.(css|js)/',\n    exclude: '/.*.min.js/',\n    remove: [\n        'path/to/file1.js',\n        'path/to/file2.js',\n    ], // Remove files from the bucket before upload.\n})\n```\n\n## Laravel Mix Implementation\n\n.env\n\n```env\nS3_KEY=your_key\nS3_SECRET=your_secret\nS3_BUCKET=your_bucket\n\n# If you are using Amazon S3 then only set region.\n# However if you are using some other provider then only set endpoint.\n# Region and endpoint both should not be set together.\n\nS3_REGION=your_region\n# S3_ENDPOINT=your_endpoint\n```\n\nwebpack.mix.js\n\n```javascript\nconst mix = require('laravel-mix');\nconst S3PusherPlugin = require('webpack-s3-pusher');\n\nif (mix.inProduction()) {\n    mix.webpackConfig({\n        plugins: [\n            new S3PusherPlugin({\n                key: process.env.S3_KEY,\n                secret: process.env.S3_SECRET,\n                bucket: process.env.S3_BUCKET,\n                region: process.env.S3_REGION,\n                // endpoint: process.env.S3_ENDPOINT,\n                prefix: 'assets',\n                acl: 'public-read',\n                cache: 'max-age=602430',\n            })\n        ]\n    });\n}\n\nmix.js('resources/js/app.js', 'public/js')\n    .postCss('resources/css/app.css', 'public/css');\n```\n\nPush assets to bucket\n\n```bash\nnpm run production\n```\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folsgreen%2Fwebpack-s3-pusher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folsgreen%2Fwebpack-s3-pusher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folsgreen%2Fwebpack-s3-pusher/lists"}