-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[TwigBundle] Cache Warmer node_modules bug fixed #34321
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name is specific enough, I think we can do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm 👎 on this. I don't think this is the right approach (there are a lot of well known directories that could be applied here) and I'm pretty sure you can solve this problem by moving the folder out of templates/
in the meantime.
The right approach in my opinion would be adding a new option to exclude directories (e.g. bundles/
by default) and/or files, using some kind of glob/pattern.
See dicussion about this topic here #34142
I'm not sure about this - I mean:
@appaydin please tell us why you didn't do this in the first place?
That's a lot of additional complexity for a rare case. Excluding just #34142 is far from being solved at all: "non-template files" is undefined. I wouldn't consider this a viable alternative solution in the near term... |
I agree, I would also consider this a rare case, that's why I'm against to add more directories arbitrarily to the hardcoded exclusion list and go ahead with workarounds. I still don't think this use case (having the |
Although I don't feel comfortable telling people where they should put their directories/files due to a problem generated by the framework. That's why also I would want do something about it. |
Keeping the front-end of the site in a single directory does not disturb the theme structure. There are different themes created with Vue, and you cannot move the node_modules directory to a different location. In order to get node_modules into a different directory, we have to split the theme structure into two. Alternative options are possible, but the directory structure becomes more complex. |
Please, let's discuss it here #34416, I don't think there's much additional complexity to it. |
👎 for me |
Closing then, thanks for proposing @appaydin |
I created a theme structure in the "templates" directory. A different webpack structure is used for each theme.
I get an error while clearing the Symfony cache "bin/console cache:clear". While the cache is warming up, twig is trying to read files in node_modules directory.
There is no problem with "bin/console cache:clear --no-warmup".
Error: