jQuery is not defined at Object.<anonymous> (application.js:19) rails 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'
})
)