[Vuejs]-Rails Webpacker + Vue mounting delay without webpack-dev-server

0👍

In config/webpacker.yml, you may have this setting for development

development:
  <<: *default
  compile: true

Which is causing the on-demand compilation.

For the production environment, did you make sure that compile is set to false?

production:
  <<: *default

  # Production depends on precompilation of packs prior to booting for performance.
  compile: false

Your Vue code should be compiled prior to starting your rails server via the rake assets:precompile command.

Leave a comment