你可以在 Rails 中使用带有 webpack 的 turbolinks 吗? [英] Can you use turbolinks with webpack in rails?

查看:50
本文介绍了你可以在 Rails 中使用带有 webpack 的 turbolinks 吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个 post 提供了一个关于如何用 webpack 替换 rails 资产管道的优秀教程.但是,它指出您应该删除 turbolinks gem.有没有办法做到这一点并且仍然使用 turbolinks?

This post provides an excellent tutorial on how to replace the rails asset pipeline with webpack. However, it states that you should remove the turbolinks gem. Is there a way to do this and still use turbolinks?

推荐答案

可以直接从 NPM 使用 https://www.npmjs.com/package/turbolinks 并按照提供的文档进行操作.

You can use it directly from NPM https://www.npmjs.com/package/turbolinks and follow the provided documentation.

这是文档 https://www.npmjs.com/package/turbolinks#installation-using-npm

这与您在其他框架中使用 Turbolinks 时相同.

This the same as when you use Turbolinks in other frameworks.

这篇关于你可以在 Rails 中使用带有 webpack 的 turbolinks 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆