rails/actiontext/package.json
Matias Grunberg 2dbcb3df33 fix using actiontext.js in sprocket
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 https://github.com/rails/rails/pull/46447.
I traced valid compilation back to
https://github.com/rails/rails/pull/42895.

This commit mimic changes made in
https://github.com/rails/rails/pull/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.
2023-11-07 00:36:53 -03:00

40 lines
1001 B
JSON

{
"name": "@rails/actiontext",
"version": "7.2.0-alpha",
"description": "Edit and display rich text in Rails applications",
"module": "app/assets/javascripts/actiontext.esm.js",
"main": "app/assets/javascripts/actiontext.js",
"files": [
"app/assets/javascripts/*.js"
],
"homepage": "https://rubyonrails.org/",
"repository": {
"type": "git",
"url": "git+https://github.com/rails/rails.git"
},
"bugs": {
"url": "https://github.com/rails/rails/issues"
},
"author": "37signals LLC",
"contributors": [
"Javan Makhmali <javan@javan.us>",
"Sam Stephenson <sstephenson@gmail.com>"
],
"license": "MIT",
"dependencies": {
"@rails/activestorage": ">= 7.1.0-alpha"
},
"peerDependencies": {
"trix": "^2.0.0"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^19.0.1",
"@rollup/plugin-node-resolve": "^11.0.1",
"rollup": "^2.35.1",
"trix": "^2.0.0"
},
"scripts": {
"build": "rollup --config rollup.config.js"
}
}