{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":724211528,"defaultBranch":"main","name":"jsbundling-rails","ownerLogin":"afcapel","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2023-11-27T16:11:09.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/150107?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1701101556.0","currentOid":""},"activityList":{"items":[{"before":"d302e633322f302a71d36b61ce0280308bb4d018","after":"e27e9e03fd32cefde4fc176866612d1c3549904b","ref":"refs/heads/include-module","pushedAt":"2023-11-29T13:19:27.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"afcapel","name":"Alberto Fernández-Capel","path":"/afcapel","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/150107?s=80&v=4"},"commit":{"message":"Import application JS as a module\n\nBun.js generates JS bundles in the ESM format and they need be imported with\nthe `type=\"module\"` attribute. Otherwise the module varibles end up in the\nglobal scope. See https://github.com/hotwired/turbo/pull/1077\n\nThis commit updates the install generator to add the type=\"module\" attribute\nto the default `javascript_include_tag`.\n\n`defer` is no longer needed, as JS modules are deferred by default.\n\nRef. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#other_differences_between_modules_and_standard_scripts\n\nThis PR also updates the default config to ensure that all bundlers are\nconfigured to output ESM bundles.\n\n- bun only supports ESM at the moment https://bun.sh/docs/bundler#format\n- esbuild is configured to output ESM with the --format=esm flag https://esbuild.github.io/api/#format-esm\n- webpacker is configured to output ESM bundles with `output.chunkFormat` https://webpack.js.org/configuration/output/#outputchunkformat\n- rollup is configured to output ESM bundles with `output.format` https://rollupjs.org/configuration-options/#output-format","shortMessageHtmlLink":"Import application JS as a module"}},{"before":null,"after":"d302e633322f302a71d36b61ce0280308bb4d018","ref":"refs/heads/include-module","pushedAt":"2023-11-27T16:12:36.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"afcapel","name":"Alberto Fernández-Capel","path":"/afcapel","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/150107?s=80&v=4"},"commit":{"message":"Import application JS as a module\n\nBun.js generates JS bundles in the ESM format and they need be imported with\nthe `type=\"module\"` attribute. Otherwise the module varibles end up in the\nglobal scope. See https://github.com/hotwired/turbo/pull/1077\n\nThis commit updates the install generator to add the type=\"module\" attribute\nto the default `javascript_include_tag`.\n\n`defer` is no longer needed, as JS modules are deferred by default.\n\nRef. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#other_differences_between_modules_and_standard_scripts\n\nThis PR also updates the default config to ensure that all bundlers are\nconfigured to output ESM bundles.\n\n- bun only supports ESM at the moment https://bun.sh/docs/bundler#format\n- esbuild outputs ESM by default when bundling is enabled https://esbuild.github.io/api/#format-esm\n- webpacker is configured to output ESM bundles with `output.chunkFormat` https://webpack.js.org/configuration/output/#outputchunkformat\n- rollup is configured to output ESM bundles with `output.format` https://rollupjs.org/configuration-options/#output-format","shortMessageHtmlLink":"Import application JS as a module"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"Y3Vyc29yOnYyOpK7MjAyMy0xMS0yOVQxMzoxOToyNy4wMDAwMDBazwAAAAO66nGj","startCursor":"Y3Vyc29yOnYyOpK7MjAyMy0xMS0yOVQxMzoxOToyNy4wMDAwMDBazwAAAAO66nGj","endCursor":"Y3Vyc29yOnYyOpK7MjAyMy0xMS0yN1QxNjoxMjozNi4wMDAwMDBazwAAAAO46uxT"}},"title":"Activity · afcapel/jsbundling-rails"}