新手问题 有没有 Asset Pipeline 的增强 gem 支持编译 ES6 的?

imwildcat · December 27, 2017 · Last by maxchen replied at March 28, 2018 · 1381 hits

想在 js 里用 ES6 特性但是感觉不想用 Webpacker(要安装的依赖太多),有没有好办法?

用 Sprockets 4 beta

Reply to jasl

4 beta 更新不成功,没找到源,是要换成哪个源吗?

Reply to jasl

命令行显示:

Fetching gem metadata from https://rubygems.org/.............
Fetching gem metadata from https://rubygems.org/.
Could not find gem 'sprockets (~> 4.0)' in any of the gem sources listed in your Gemfile.

Gemfile 文件:

source 'https://rubygems.org'

git_source(:github) do |repo_name|
  repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
  "https://github.com/#{repo_name}.git"
end

gem "sprockets", "~> 4.0.0.beta4"

Reply to jasl

嗯 可以安装了 谢谢你

You need to Sign in before reply, if you don't have an account, please Sign up first.