perf(javascript): replace add-node-modules-path
The add-node-modules-path package calls `npm bin` to locate the node_modules/.bin, and does so while invoking the user's $SHELL, which can be very expensive depending on the user's shell configuration, possibly adding seconds to the startup time of any JS/TS file. To mitigate this, I replace the package with a much faster, and in-house heuristic. Folks with more complex needs should be using direnv anyway. Fix: #6878
This commit is contained in:
parent
4bd4b13158
commit
d25ff46d46
3 changed files with 10 additions and 2 deletions
|
@ -323,7 +323,7 @@ to tide."
|
|||
typescript-mode
|
||||
solidity-mode)
|
||||
:when (locate-dominating-file default-directory "package.json")
|
||||
:add-hooks '(add-node-modules-path npm-mode))
|
||||
:add-hooks '(+javascript-add-npm-path-h npm-mode))
|
||||
|
||||
(def-project-mode! +javascript-gulp-mode
|
||||
:when (locate-dominating-file default-directory "gulpfile.js"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue