Skip to content

Memory issue using Webpack Encore + Twig + Symfony cache:clear #946

@Cartman34

Description

@Cartman34

Hello,

I am just upgrading my app to the last version of symfony using composer update et boom, Symfony cache:clear just blow up my face.
I am using webpack encore with stimulus and part of this is for generating css for emails, so in twig.yaml, I added the path
'%kernel.project_dir%/public/build': styles
And I reference css with @styles/email.css

The folder /public/build is containing some css files with one file up to 1.2 MB, and this size is much more about sourceMappingURL (782 486 characters) than the contents.

Previously, it was working fine but now, I am getting the following error

Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4840168 bytes)

Memory limit is 128MB, I would like to not change it.

No error without this path.

So now, how to fix it please ? What's the problem ?
Could you suggest a quick solution ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions