Skip to content

Changing the wording around module.exports #10692

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

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions frontend/encore/simple-example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ The import and export Statements
--------------------------------

Instead of using ``require`` and ``module.exports`` like shown above, JavaScript
has an alternate syntax, which is a more accepted standard. Choose whichever you
want: they do the same thing.
provides an alternate syntax based on the `ECMAScript 6 modules`_ that includes
the ability to use dynamic imports.

To export values using the alternate syntax, use ``exports``:

Expand Down Expand Up @@ -345,3 +345,4 @@ Encore support many more features! For a full list of what you can do, see
`Encore's index.js file`_. Or, go back to :ref:`list of Encore articles <encore-toc>`.

.. _`Encore's index.js file`: https://github.com/symfony/webpack-encore/blob/master/index.js
.. _`ECMAScript 6 modules`: https://hacks.mozilla.org/2015/08/es6-in-depth-modules/