Getting this error in rails 6, in rails 5 it was a easy fix after updating the application to rails 6, including webpack this error is appear every where I try to close the model inside the js.erb files.
My files: pack/application.rb
require("@rails/ujs").start()
require("turbolinks").start()
require("@rails/activestorage").start()
require("channels")
import "bootstrap";
import "./src/application.scss";
import "jquery"
file pack/src/application.scss
@import "~bootstrap/scss/bootstrap";
file config/webpack/environment.js
const { environment } = require('@rails/webpacker')
const webpack = require('webpack')
environment.plugins.prepend('Provide',
new webpack.ProvidePlugin({
$: 'jquery/src/jquery',
jQuery: 'jquery/src/jquery'
})
)
module.exports = environment