新的 Rails 7 应用程序带有 -j esbuild,JavaScript 似乎被“禁用”;
I tried this exact approach to create a new Rails 7 app in How to install jQuery and bootstrap in rails 7 app using esbuild (without webpacker) , but now it seems like my rails app is just ignoring javascript all together - no errors, but no javascript running either (if I add a console log or alert, nothing happens, or introduce bugs in the existing js, no errors are reported - it’s as if the “JavaScript” folder doesn’t exist). I didn’t make any changes to the default created app. If I try creating a new app without esbuild, then I do have javascript working (executing), but then of course i have the issue I was originally trying to solve with esbuild of getting jquery to work. Any thoughts please on what I could be missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
哇 - 必须有些东西。我仍在使用Rails Server而不是./bin/dev-使该开关修复了。
Wow - it had to be something. I was still using rails server instead of ./bin/dev - making that switch fixed it.