-
-
Couldn't load subscription status.
- Fork 5.3k
updating Encore docs for 1.0 #14895
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
updating Encore docs for 1.0 #14895
Conversation
c4613b1 to c67c0d7 Compare 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.
Hi Ryan,
I was planning to open a new PR for documenting changes from symfony/webpack-encore#893, but since you already opened a PR maybe I can do some suggestions here:
- In https://symfony.com/doc/current/frontend/encore/virtual-machine.html#fix-invalid-host-header-issue, replace
--disable-host-checkby--firewall false - In https://symfony.com/doc/current/frontend/encore/vuejs.html#hot-module-replacement-hmr,
--hotis always mentioned
Thanks! :)
| .. code-block:: diff | ||
| Hot module replacement is a superpower of the ``dev-server`` where styles and | ||
| (in some cases) JavaScript can automatically update without needing to reload | ||
| your page. HMR works automatically with CSS (as long as you're using the |
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.
Oh! Does it mean we don't have to use Encore.disableCssExtraction(Encore.isDevServer()) anymore? Nice! :D
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 haven't read about this specifically, but when I tested it on my project earlier (which DOES always use CSS extraction), it totally worked!
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 confirm I didn't had to use Encore.disableCssExtraction(Encore.isDevServer()) on my project too!
| Thanks @Kocal! I really appreciate it - good catches. |
344d73b to f471149 Compare | Hi! I'm sorry, I was wrong for the option However, using Encore.configureDevServer(option => { option.firewall = false; }); |
| What do you think about the last commit @Kocal? I'm showing |
| That's great 👍 I don't think this will be an issue for not specifying |
frontend/encore/reactjs.rst Outdated
| $ yarn add @babel/preset-react --dev | ||
| $ yarn add react react-dom prop-types | ||
| $ yarn add react react-dom prop-types --dev |
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.
That's funny because we have the same contribution last week (#14867)
Are we sure about this modification?
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 thought we did EVERYTHING as --dev because none of this is actually read at runtime. This allows for the edge case of an application where you have Encore + some Node app that you do run on production at runtime..
But, I'm going to remove it so it doesn't get blocked.
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.
As you wish!
| Ok, should be good again! |
| * :doc:`Using a CDN </frontend/encore/cdn>` | ||
| * :doc:`/frontend/encore/code-splitting` | ||
| * :doc:`/frontend/encore/split-chunks` | ||
| * :doc:`Creating a "Shared" entry for re-used modules </frontend/encore/shared-entry>` |
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.
shall we redirect this?
5ce2c58 to e8c902c Compare | Beware that `it's not recommended to disable host checking`_ in general, but | ||
| here it's required to solve the CORS issue. |
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 think that warning should be kept since it is still not recommended to disable those checks entirely (you can usually make it work by explicitly whitelisting hosts).
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.
Got it here: #14929
e8c902c to a85f968 Compare …verryan) This PR was merged into the 5.2 branch. Discussion ---------- Encore dev-server: re-add host check warning See: symfony#14895 (comment) Commits ------- 47d7639 re-adding warning about host check
Hi!
I do an entire, quick read-through of the docs and updated for 1.0 (and modernized a few spots - like
var->const- symfony/recipes#886Cheers!