Skip to content

Commit

Permalink
Merge pull request #46871 from dbreunig/patch-1
Browse files Browse the repository at this point in the history
Prepend a '\n' to the string to be added to `application.js`
  • Loading branch information
byroot committed Jan 6, 2023
2 parents ffa644e + 04177c1 commit d1d0cb5
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -19,7 +19,7 @@ def append_javascript_dependencies
destination = Pathname(destination_root)

if (application_javascript_path = destination.join("app/javascript/application.js")).exist?
insert_into_file application_javascript_path.to_s, %(import "trix"\nimport "@rails/actiontext"\n)
insert_into_file application_javascript_path.to_s, %(\nimport "trix"\nimport "@rails/actiontext"\n)
else
say <<~INSTRUCTIONS, :green
You must import the @rails/actiontext and trix JavaScript modules in your application entrypoint.
Expand Down

0 comments on commit d1d0cb5

Please sign in to comment.