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

Appearance settings

[Frontend] Add docs for custom loaders #8083

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

Conversation

pierredup
Copy link
Contributor

Add docs to register custom loaders for Encore

Closes #8053

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.

Thanks for adding this! We just need some minor tweaks :)

Adding Custom Loaders
=====================

Encore already comes with a variety of different loaders that you can use out of the box,
Copy link
Member

Choose a reason for hiding this comment

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

... out of the box. But if...

=====================

Encore already comes with a variety of different loaders that you can use out of the box,
but if there is a specific loader that you want to use that is not currently supported, then you
Copy link
Member

Choose a reason for hiding this comment

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

supported, you can add your own loader...

can easily add your own loader through the ``addLoader`` function.
The ``addLoader`` takes any valid webpack rules config.

If, for example, you want to add the `handlebars-loader`_, you can just ``addLoader`` with
Copy link
Member

Choose a reason for hiding this comment

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

, call addLoader with...

Since the loader config accepts any valid Webpack rules object, you can pass any
additional information your need for the loader

.. code-block:: twig
Copy link
Member

Choose a reason for hiding this comment

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

should be javascript

]
}
}
)
Copy link
Member

Choose a reason for hiding this comment

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

The CS on this isn't quite right yet...

@weaverryan
Copy link
Member

I've actually just made this part of my #8084 so that I can use some of your changes :). I'll merge your stuff there

@weaverryan weaverryan closed this Jun 25, 2017
weaverryan added a commit that referenced this pull request Jun 26, 2017
This PR was merged into the 3.3 branch.

Discussion
----------

Various Encore updates

Closes:
* #8053
* #8067
* #8069
* #8071
* #8070
* #8072

Replaces #8083

Commits
-------

15e816e Tweaks thanks to Javier
f8461d3 adding anotehr faq for old packages without a main script
f5c22a6 minor rewording
a0982ec [Encore] Adding more FAQs for #8072
807b83f [Encore] Documenting addPlugin - see #8070
a099bff Documenting (better) how to expose global variables - see #8071
8b0a22a [Encore] Adding docs about deploying to a subdirectory - see #8069
62dd63e Adding docs about adding custom config - see #8067
0ff1c3c Add missing link to handlebars-loader
3d9905e Add docs for custom loaders
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.