Skip to content

Commit

Permalink
Keep node_modules for assets
Browse files Browse the repository at this point in the history
  • Loading branch information
fumimowdan committed Oct 18, 2023
1 parent 9d7c07d commit 16570be
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ ARG GOVUK_NOTIFY_GENERIC_EMAIL_TEMPLATE_ID
ENV GOVUK_NOTIFY_GENERIC_EMAIL_TEMPLATE_ID=$GOVUK_NOTIFY_GENERIC_EMAIL_TEMPLATE_ID

RUN bundle exec rake assets:precompile && \
rm -rf node_modules tmp
rm -rf tmp

CMD ./bin/app-startup.sh
2 changes: 0 additions & 2 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults(7.0)

config.assets.paths << Rails.root.join("node_modules")
config.assets.paths << Rails.root.join("node_modules/govuk-frontend/govuk/assets")
config.autoload_paths << Rails.root.join("app/services")

# Configuration for the application, engines, and railties goes here.
Expand Down
2 changes: 2 additions & 0 deletions config/initializers/assets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

# Version of your assets, change this if you want to expire all your assets.
Rails.application.config.assets.version = "1.0"
Rails.application.config.assets.paths << Rails.root.join("node_modules")
Rails.application.config.assets.paths << Rails.root.join("node_modules/govuk-frontend/govuk/assets")

# Add additional assets to the asset load path.
# Rails.application.config.assets.paths << Emoji.images_path
Expand Down

0 comments on commit 16570be

Please sign in to comment.