Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Asset] Ignore missing manifest.json files in non-strict mode#46689

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

@nicolas-grekas
Copy link
Member

QA
Branch?5.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix -
LicenseMIT
Doc PR-

Something we missed in#38495 I suppose.

In its current state, the webapp-pack cannot be used without runningyarn encore dev or similar: as soon as one uses the{{ asset() }} helper in a Twig file, an exception is thrown because themanifest.json file is missing.

Similar tosymfony/recipes#1087, we should instead ignore when this file is missing by default, in non-strict mode only of course.

@GromNaN
Copy link
Member

GromNaN commentedJun 15, 2022
edited
Loading

This behavior was not modified by#38495: when the manifest file does not exist, the asset helper always throws an exception (already in4.4).
If we are to change it, this is a new feature that should target 6.2.

Personally, I enable strict mode on all environments. So yes, thenpm run build is required before running the tests or opening a page on dev environment.

What is the point of requiringwebpack-encore-bundle inwebapp-pack if running the webpack job is optional?

@nicolas-grekas
Copy link
MemberAuthor

The webapp pack experience is plain broken right now, we cannot afford to wait for 6.2 to fix it.
Any alternative idea? Removing webpack encore from the pack?

@nicolas-grekas
Copy link
MemberAuthor

/cc@weaverryan

@GromNaN
Copy link
Member

GromNaN commentedJun 16, 2022
edited
Loading

An other alternative would be to create an empty manifest.json file 🙄.

But not installingwebpack-encore-bundle by default would make easier to understand why npm/yarn is required.

@weaverryan
Copy link
Member

I think we don't include Encore - so mergesymfony/webapp-pack#7 . Runningcomposer require encore is still very easy. And as@GromNaN said, you then know that you will need npm/yarn to run some other commands.

Even if try to include Encore, but without an error, it's not super useful. It would do nothing until you ran the npm/yarn commands. So if you already will need to run some commands, probablycomposer require encore isn't a big extra command to need to run :).

@nicolas-grekas
Copy link
MemberAuthor

Closing in favor ofsymfony/webapp-pack#7

@nicolas-grekasnicolas-grekas deleted the asset-not-strict branchJune 18, 2022 09:13
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

4 participants

@nicolas-grekas@GromNaN@weaverryan@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp