-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Encore] Document exposing global variables #8071
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
Comments
I would recommend this instead: const $ = require('jquery');
global.$ = global.jQuery = $; This would let us add |
Merged
weaverryan
added a commit
that referenced
this issue
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
weaverryan
added a commit
that referenced
this issue
Jun 28, 2017
* 3.4: Fixes for #8084 thanks to Stof Tweaks thanks to Javier Use Twig's namespaced paths adding anotehr faq for old packages without a main script minor rewording [Encore] Adding more FAQs for #8072 [Encore] Documenting addPlugin - see #8070 Documenting (better) how to expose global variables - see #8071 [Encore] Adding docs about deploying to a subdirectory - see #8069 Adding docs about adding custom config - see #8067 Add missing link to handlebars-loader Add docs for custom loaders [#8004] some minor tweaks document new framework.assets.json_manifest_path option Minor reword Clearify setup of basic auth for test environment Update workflow.rst rearrange how workflow events are presented adding note about extracting CSS Adding note about browserslist config
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In many cases, you may need to do this:
so that you can use
$
orjQuery
outside of a webpack file (e.g. because you have some JS in a template). We need to document this in the "legacy" section.The text was updated successfully, but these errors were encountered: