Skip to content

Instantly share code, notes, and snippets.

@itzbernoulli
Created July 17, 2020 01:34
Show Gist options
  • Save itzbernoulli/caa92c592ab4f87636531d7724a33ef3 to your computer and use it in GitHub Desktop.
Save itzbernoulli/caa92c592ab4f87636531d7724a33ef3 to your computer and use it in GitHub Desktop.
Add the dollar symbol to reference jQuery in rails webpacker
const webpack = require('webpack')
environment.plugins.prepend('Provide',
new webpack.ProvidePlugin({
$: 'jquery/src/jquery',
jQuery: 'jquery/src/jquery'
})
)
module.exports = environment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment