[javascript] Use js2-mode with .cjs files
.cjs is an extension for CommonJS files, and is needed if `"type": "module"` is specified for a Node package.
This commit is contained in:
parent
11277c517c
commit
3afb088940
1 changed files with 1 additions and 1 deletions
|
@ -112,7 +112,7 @@
|
|||
(defun javascript/init-js2-mode ()
|
||||
(use-package js2-mode
|
||||
:defer t
|
||||
:mode (("\\.m?js\\'" . js2-mode))
|
||||
:mode (("\\.[cm]?js\\'" . js2-mode))
|
||||
:init
|
||||
(progn
|
||||
(add-hook 'js2-mode-local-vars-hook #'spacemacs//javascript-setup-backend)
|
||||
|
|
Reference in a new issue