We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
suggestion
8
In chapter 8 you suggest using this code in order to include bootstrap in a project.
import $ from 'jquery' import Tether from 'tether' window.jQuery = $ window.Tether = Tether require('bootstrap')
Is there a reason not to use the following code that preloads jquery and tether so that you can just do import 'bootstrap'; in the project?
import 'bootstrap';
new webpack.ProvidePlugin({ $: "jquery", jQuery: "jquery", "window.jQuery": "jquery", Tether: "tether", "window.Tether": "tether", }),
The only drawback I have found is that eslint complains about $ being undefined but that can be solved by adding in .eslintrc.json the following:
$
"env": { "jquery": true },
The text was updated successfully, but these errors were encountered:
That is probably a cleaner way to do it, thanks for bringing it up :)
Sorry, something went wrong.
No branches or pull requests
Type of issue: (feature suggestion, bug?)
suggestion
Chapter:
8
In chapter 8 you suggest using this code in order to include bootstrap in a project.
Is there a reason not to use the following code that preloads jquery and tether so that you can just do
import 'bootstrap';
in the project?The only drawback I have found is that eslint complains about
$
being undefined but that can be solved by adding in .eslintrc.json the following:The text was updated successfully, but these errors were encountered: