Skip to content

How to include some files/folders in packagePhpCode? #15

@kevincerro

Description

@kevincerro

Its currently possible to include files/folders which parent folder is excluded in CDK?

(include key is not valid)

const phpFpm = new PhpFpmFunction(this, 'web', {
    phpVersion: '8.4',
    handler: 'public/index.php',
    code: packagePhpCode(undefined, {
        exclude: ['public/assets'],
        include: ['public/assets/build/manifest.json'],
    }),
});

Working example in serverless.yml

package:
    patterns:
        # Excluded files and folders for deployment
        - '!public/**'
        # If you want to include files and folders that are part of excluded folders,
        # add them at the end
        - 'public/assets/build/entrypoints.json'
        - 'public/assets/build/manifest.json'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions