Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional files are uploaded along with their compressed versions when it is not required #72

Open
vvasin opened this issue Sep 11, 2023 · 1 comment

Comments

@vvasin
Copy link

vvasin commented Sep 11, 2023

When using a multi-CDN configuration, if the compression is enabled only in the first one, additional files are uploaded to the second CDN along with their compressed versions anyway.

A sample configuration:

cdn: [
    {
        bucket: '<bucket-1>',
        prefix: 'build',
        region: 'eu-central-1',
        compress: true,
        additionalPattern: 'i18n/**/*',
    },
    {
        bucket: '<bucket-2>',
        prefix: 'build',
        region: 'eu-central-1',
        compress: false,
        additionalPattern: 'i18n/**/*',
    },
],

This leads to the upload, for example, the <bucket-1>/build/i18n/en...js.gz and <bucket-2>/build/i18n/en...js.gz files. However, the <bucket-2>/build/js/main...js.gz file would not be uploaded. If the additional pattern is not specified in the first configuration, the feature works as expected, and the <bucket-2>/build/i18n/en...js.gz file will not be uploaded in this case.

@ValeraS
Copy link
Collaborator

ValeraS commented Sep 11, 2023

You can use i18n/**/*.js pattern, it should solve the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants