Every line of 'remove node_modules' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
111 function cleanNodeModulePackages() { 112 return del(cleanGlobs); 113 }
Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code
186 static _cleanModules(modules, pathToNodeModules) { 187 modules.forEach((p) => { 188 p.version = WebpackCdnPlugin.getVersionInNodeModules(p.name, pathToNodeModules); 189 190 if (!p.paths) { 191 p.paths = []; 192 } 193 if (p.path) { 194 p.paths.unshift(p.path); 195 p.path = undefined; 196 } 197 if (p.paths.length === 0 && !p.cssOnly) { 198 p.paths.push( 199 require 200 .resolve(p.name) 201 .match(/[\\/]node_modules[\\/].+?[\\/](.*)/)[1] 202 .replace(/\\/g, '/'), 203 ); 204 } 205 206 if (!p.styles) { 207 p.styles = []; 208 } 209 if (p.style) { 210 p.styles.unshift(p.style); 211 p.style = undefined; 212 } 213 }); 214 }