Skip to content

Commit

Permalink
Merge pull request #76 from justinlang/precompile-assets-for-sprocket-4
Browse files Browse the repository at this point in the history
Update engine to precompile graphiql assets
  • Loading branch information
Robert Mosolgo authored Aug 17, 2021
2 parents e740f8f + fa638c9 commit e913c4a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/graphiql/rails/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ module GraphiQL
module Rails
class Engine < ::Rails::Engine
isolate_namespace GraphiQL::Rails

if defined?(Sprockets) && Sprockets::VERSION.chr.to_i >= 4
initializer 'graphiql.assets.precompile' do |app|
app.config.assets.precompile += %w(
graphiql/rails/application.css
graphiql/rails/application.js
)
end
end
end
end
end

0 comments on commit e913c4a

Please sign in to comment.