MikaAK / s3-plugin-webpack

Uploads files to s3 after complete
MIT License
486 stars 125 forks source link

Using basePathTransform produces TypeError: this.basePathTransform is not a function #148

Closed steviekong closed 3 years ago

steviekong commented 3 years ago

Please complete these steps and check these boxes (by putting an x inside the brackets) before filing your issue:

Thank you for adhering to this process! This ensures that I can pay attention to issues that are relevant and answer questions faster.

Issue Details

  1. Node version v15.2.0
  2. OS - macOS 11.0.1

Using following config produces TypeError: this.basePathTransform is not a function

webpackPlugins = [
    new s3Plugin({
      include: /.*\.(css|js)$/,
      s3Options: {
        accessKeyId: process.env.AWS_ACCESS_KEY_ID,
        secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
        region: process.env.AWS_DEFAULT_REGION,
      },
      s3UploadOptions: {
        Bucket: process.env.AWS_BUCKET,
        CacheControl: "public, max-age=31536000",
      },
      basePathTransform: "app/public",
    }),
  ];
MikaAK commented 3 years ago

https://github.com/MikaAK/s3-plugin-webpack#with-basepathtransform Use a function