Skip to content

Added strict mode #43 #54

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

Merged
merged 1 commit into from
May 26, 2019
Merged

Added strict mode #43 #54

merged 1 commit into from
May 26, 2019

Conversation

karser
Copy link
Contributor

@karser karser commented Mar 20, 2019

This PR introduces strict_mode which is true by default so it doesn't change the original bundle behavior. If set to false it suppresses all the exceptions thrown because of missing builds. It makes sense to disable strict mode for test environment where you don't need to build your assets.

# config/packages/test/webpack_encore.yaml
webpack_encore:
    strict_mode: false

Here is the original issue #43

@karser
Copy link
Contributor Author

karser commented Mar 24, 2019

Hi @weaverryan , Do you think it can be merged? Please take a look at this PR

Copy link
Member

@weaverryan weaverryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few implementation things, but this is definitely a good idea - don't see any reason not to do this :)

Copy link
Member

@weaverryan weaverryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great - minor comments (and needs a rebase now)

@karser
Copy link
Contributor Author

karser commented Apr 11, 2019

@weaverryan fixed and rebased.

@karser
Copy link
Contributor Author

karser commented Apr 29, 2019

@weaverryan Have you had time to look into this? I think it's ready for merge

@weaverryan
Copy link
Member

Very well done! Thanks for the great work and your patience @karser!

@weaverryan weaverryan merged commit a74a5a2 into symfony:master May 26, 2019
weaverryan added a commit that referenced this pull request May 26, 2019
This PR was merged into the master branch.

Discussion
----------

Added strict mode #43

This PR introduces `strict_mode` which is true by default so it doesn't change the original bundle behavior. If set to false it suppresses all the exceptions thrown because of missing builds. It makes sense to disable strict mode for test environment where you don't need to build your assets.

```
# config/packages/test/webpack_encore.yaml
webpack_encore:
    strict_mode: false
```
Here is the original issue #43

Commits
-------

a74a5a2 Added strict mode
@karser
Copy link
Contributor Author

karser commented May 26, 2019

I'm glad it's merged! 👍

javiereguiluz added a commit to javiereguiluz/symfony-docs that referenced this pull request Sep 22, 2022
…losoft)

This PR was submitted for the 6.0 branch but it was squashed and merged into the 5.4 branch instead.

Discussion
----------

Add information about strict_mode for encore

I guess it should be both in `5.4` and `6.0`, but actually will be useful down to whenever symfony/webpack-encore-bundle#54 was merged

Personally, it took me quite a long time to determine and fix the cause of functional tests failing in CI. I know that stuff is kind of mentioned in `config/packages/webpack_encore.yaml`, but here are my excuses

* there is certain time gap between you first install webpack, write your functional tests (involved with actual HTML rendering), add some styles/scripts to template and setup CI to run these tests
* this stuff is not mentioned in the docs at all - `fgrep -RH strict_mode .` gives 0 results

Commits
-------

2b6371f Add information about strict_mode for encore
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

Successfully merging this pull request may close these issues.

2 participants