localstack-webpack-sync
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

LocalStack Webpack Sync

This plugin provides a way to automatically sync your Webpack Builds into an S3 Bucket for use with LocalStack Cloudfront Distributions.

Usage:

const LocalStackWebpackSync = require("localstack-webpack-sync").default;

module.exports = () => ({
  plugins: [
    new LocalStackWebpackSync({
      bucket: "bucket-name", // (You can also pass in `/bucket\-name/` for regex matching instead)
    })
  ],
    
  devServer: {
    open: true,
    allowedHosts: [".cloudfront.localhost.localstack.cloud"], // This allows CloudFront to poll the webpack info socket to know when to reload
    https: true // If you've set CloudFront to only accept https, it'll also attempt to hit the webpack info socket through https
  }
});

Options:

Name Type Description
bucket string/RegExp The plugin will use the S3 Client to list all buckets in LocalStack and try to find a bucket matching this name. If you pass in a regular expression, it will fetch the first bucket that matches that regular expression

Readme

Keywords

none

Package Sidebar

Install

npm i localstack-webpack-sync

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

1.19 MB

Total Files

16

Last publish

Collaborators

  • garethp