rails 6 Uncaught ReferenceError: $ is not defined code example
Example: jquery is not defined rails
//Try adding this to your config/webpack/environment.js
const webpack = require('webpack')
environment.plugins.prepend('Provide',
new webpack.ProvidePlugin({
$: 'jquery/src/jquery',
jQuery: 'jquery/src/jquery'
})
)