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
I have trouble to get jQuery exposed to window. This does not work. I tried in to use ProvidePlugin described on http://webpack.github.io/docs/shimming-modules.html on but it did not work in demo09.
plugins: [ //... new webpack.ProvidePlugin({ $: "jquery", jQuery: "jquery", "window.jQuery": "jquery" }) ]
The text was updated successfully, but these errors were encountered:
Ok, got it working with:
module: { loaders: [ { test: require.resolve("jquery"), loader: "expose?jquery" } ] }
Anyway, it would be cool if you add some example on that case :)
Sorry, something went wrong.
It worked for me.
// webpack.config.js var webpack = require('webpack'); module.exports = { entry: { app: './main.js' }, output: { filename: 'bundle.js' }, plugins: [ new webpack.ProvidePlugin({ $: "jquery", jQuery: "jquery", "window.jQuery": "jquery" }) ] };
I will add the case into README.
No branches or pull requests
I have trouble to get jQuery exposed to window. This does not work. I tried in to use ProvidePlugin described on http://webpack.github.io/docs/shimming-modules.html on but it did not work in demo09.
The text was updated successfully, but these errors were encountered: