Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Fix encore advanced config watchOptions example#10923
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
javiereguiluz commentedJan 24, 2019
@eXtreme thanks for contributing this. Sadly, I can't reproduce this error. If I add the This is what I did: I added So, can you please double check if this works for you too? Thanks! |
eXtreme commentedJan 24, 2019
@javiereguiluz when I just dump the config in the varconfig=Encore.getWebpackConfig();console.log(config); the output is: and Isn't this because I use the dev server?https://symfony.com/doc/current/frontend/encore/dev-server.html If so, maybe we should change the docs and add two versions of this snippet, one for "using webpack-dev-server" and one for not using it. |
Lyrkan commentedJan 25, 2019
Hi there, @eXtreme Indeed, if you use the dev server ( That being said there is a pending PR on Encore that should help setting those parameters correctly by introducing an |
eXtreme commentedJan 25, 2019
Hi@Lyrkan that indeed looks like a better approach. |
This PR was merged into the 3.4 branch.Discussion----------Fix encore advanced config watchOptions exampleI've been struggling with this for some time and couldn't get `watchOptions` to work. After a long investigation I added `devServer` to the config and it started working.So I guess this is the correct example of adding watchOptions to the config.Commits-------06f5c23 Fix encore advanced config watchOptions example
javiereguiluz commentedJan 25, 2019
eXtreme commentedJan 25, 2019
@javiereguiluz that sounds reasonable at this moment, thanks! |
Kocal commentedMar 1, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Hi@javiereguiluz, I've just seen your comment about updating some code whensymfony/webpack-encore#486 will be merged and Since we don't need to use // if you run 'encore dev --watch'config.watchOptions={poll:true,ignored:/node_modules/};// if you run 'encore dev-server'config.devServer.watchOptions={poll:true,ignored:/node_modules/}; And of course document Thanks |
I've been struggling with this for some time and couldn't get
watchOptionsto work. After a long investigation I addeddevServerto the config and it started working.So I guess this is the correct example of adding watchOptions to the config.