Sha256: 93a51d0405daf1d21513c434c7da0a0c5c731f9c405eb4eabe804727174c0ee2

Contents?: true

Size: 1.12 KB

Versions: 55

Compression:

Stored size: 1.12 KB

Contents

return unless Rails.application.config.respond_to?(:assets)

# Include the govuk_publishing_components manifest into list of assets to
# be pre-compiled. This allows that the same Sprockets manifest to be used 0
# with Sprockets 3 and 4 without applications needing to manually require it.
#
# In future we may want applications to link directly to this from their
# manifest file as the use of `config.assets.precompile` is discouraged
Rails.application.config.assets.precompile += %w[govuk_publishing_components_manifest.js]

Rails.application.config.assets.paths += %W[
  #{__dir__}/../../node_modules/govuk-frontend/dist/govuk/assets/images
  #{__dir__}/../../node_modules/govuk-frontend/dist/govuk/assets/fonts
  #{__dir__}/../../node_modules/govuk-frontend/dist
  #{__dir__}/../../node_modules/
]

# We've experienced segmentation faults when pre-compiling assets with libsass.
# Disabling Sprockets 4's export_concurrent setting seems to resolve the issues
# see: https://github.com/rails/sprockets/issues/633
Rails.application.config.assets.configure do |env|
  env.export_concurrent = false if env.respond_to?(:export_concurrent=)
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
govuk_publishing_components-51.1.0 config/initializers/assets.rb
govuk_publishing_components-51.0.0 config/initializers/assets.rb
govuk_publishing_components-50.0.1 config/initializers/assets.rb
govuk_publishing_components-50.0.0 config/initializers/assets.rb
govuk_publishing_components-49.1.0 config/initializers/assets.rb
govuk_publishing_components-49.0.0 config/initializers/assets.rb
govuk_publishing_components-48.0.0 config/initializers/assets.rb
govuk_publishing_components-47.0.0 config/initializers/assets.rb
govuk_publishing_components-46.4.0 config/initializers/assets.rb
govuk_publishing_components-46.3.1 config/initializers/assets.rb
govuk_publishing_components-46.3.0 config/initializers/assets.rb
govuk_publishing_components-46.2.0 config/initializers/assets.rb
govuk_publishing_components-46.1.0 config/initializers/assets.rb
govuk_publishing_components-46.0.0 config/initializers/assets.rb
govuk_publishing_components-45.10.0 config/initializers/assets.rb
govuk_publishing_components-45.9.0 config/initializers/assets.rb
govuk_publishing_components-45.8.0 config/initializers/assets.rb
govuk_publishing_components-45.7.0 config/initializers/assets.rb
govuk_publishing_components-45.6.1 config/initializers/assets.rb
govuk_publishing_components-45.6.0 config/initializers/assets.rb