Skip to content

Commit 3475bf9

Browse files
committed
Add explicit strict mode in components index file
If this file gets compiled with terser via sprockets it complain about top-level await is not available. This code will always ever run in context of a module, which implicitely implies strict mode, but Terser need this hint anyway. Refs ahorek/terser-ruby#62 Closes #3245 (cherry picked from commit 1c19cd4)
1 parent db3bd15 commit 3475bf9

File tree

1 file changed

+3
-0
lines changed
  • app/javascript/alchemy_admin/components

1 file changed

+3
-0
lines changed

app/javascript/alchemy_admin/components/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
"use strict"
2+
// ^ add support for top-level await in Terser
3+
14
import "alchemy_admin/components/action"
25
import "alchemy_admin/components/attachment_select"
36
import "alchemy_admin/components/button"

0 commit comments

Comments
 (0)