Sha256: 2ffbeb9e95deb3e87d03580a3a4c2bdf85bce214f7b7d788575a121cf686a3d9
Contents?: true
Size: 766 Bytes
Versions: 9
Compression:
Stored size: 766 Bytes
Contents
require_relative './sprockets_environment' module WebpackRails class Engine < ::Rails::Engine engine_name 'webpack' config.webpack_rails = ActiveSupport::OrderedOptions.new initializer :setup_webpack_rails, after: 'sprockets.environment', group: :all do |app| WebpackRails::SprocketsEnvironment.enhance!(app.assets, app.config.webpack_rails) # where [name].bundle.js files should be app.assets.append_path Rails.root.join('tmp/webpack/bundles') # stop sprockets from ruining inline sourcemaps in dev if Rails.env.development? app.assets.unregister_postprocessor 'application/javascript', ::Sprockets::SafetyColons end end rake_tasks do load 'webpack_rails/webpack.rake' end end end
Version data entries
9 entries across 9 versions & 1 rubygems