Closed tim-janik closed 2 years ago
Telling emacs to use web-mode for .mjs and .cjs files isn't enough to enable Javascript treatment of these file types. I suggest to add the following:
diff --git a/web-mode.el b/web-mode.el index 1443dbe..e28f03f 100644 --- a/web-mode.el +++ b/web-mode.el @@ -926,7 +926,7 @@ Must be used in conjunction with web-mode-enable-block-face." (defvar web-mode-content-types '(("css" . "\\.\\(s?css\\|css\\.erb\\)\\'") - ("javascript" . "\\.\\(js\\|js\\.erb\\)\\'") + ("javascript" . "\\.\\([mc]?js\\|js\\.erb\\)\\'") ("typescript" . "\\.\\(ts\\|ts\\.erb\\)\\'") ("json" . "\\.\\(api\\|json\\|jsonld\\)\\'") ("jsx" . "\\.[jt]sx\\'")
done
Telling emacs to use web-mode for .mjs and .cjs files isn't enough to enable Javascript treatment of these file types. I suggest to add the following: