Skip to content

Commit

Permalink
Use the preserve-symlinks option in dev
Browse files Browse the repository at this point in the history
  • Loading branch information
taylor-steve committed Oct 31, 2024
1 parent 17fc6e5 commit 7177afc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/generators/spotlight/assets/propshaft_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def add_stylesheets
def configure_esbuild
# The main-fields option resolves a bundling issue with bootstrap/popper on esbuild.
custom_options = '--main-fields=main,module --alias:jquery=./app/javascript/jquery-shim.js'
custom_options = "#{custom_options} --preserve-symlinks" if options[:test]
gsub_file 'package.json',
'esbuild app/javascript/*.* --bundle --sourcemap --format=esm --outdir=app/assets/builds --public-path=/assets',
"esbuild app/javascript/*.* --bundle --sourcemap --format=esm --outdir=app/assets/builds --public-path=/assets #{custom_options}"
Expand Down

0 comments on commit 7177afc

Please sign in to comment.