Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
actiontext.js is compiled as ESM bundle instead of UMD bundle. This leads to issues when trying to use ActionText with sprockets because the ESM bundle declares variables like they are scoped to the file but sprockets will see them as scoped globally. This is a problem, in particular, if you want to mix actiontext with turbo-rails. The problem got introduced in rails#46447. I traced valid compilation back to rails#42895. This commit mimic changes made in rails#42895 to ActiveStorage: Retains app/assets/javascripts/actiontext.js as a UMD package for backwards compatibility with bundling in the asset pipeline, but also adds app/assets/javascripts/actiontext.esm.js for use with ESM via importmap in the browser.
- Loading branch information