stephencookdev / speed-measure-webpack-plugin

⏱ See how fast (or not) your plugins and loaders are, so you can optimise your builds
MIT License
2.41k stars 80 forks source link

RangeError: Maximum call stack size exceeded #159

Closed ermuz closed 3 years ago

ermuz commented 3 years ago

vue.config.js ` const SpeedMeasurePlugin = require('speed-measure-webpack-plugin');

const smp = new SpeedMeasurePlugin({ granularLoaderData: true })

...

smp.warp(config) `

then run build,i got the RangEorror:Maximum call stack size exceeded

the position is in smp/utils.js file,and the function is hackWrapLoaders which overrided the origin require.

it was weird that when i build in a simple demo, i could got the built successfully.

BTW,the getLoaderName which in smp/loader.js file, if argument is a pass custom loader path which is not in node_modules dir, the /\/node_modules\/([^\/]+)/ couldn't match, then just return empty string.I think the RegExphttps://github.com/stephencookdev/speed-measure-webpack-plugin/blob/b5ff09e699416fe336d1df1896af5c50e6596deb/utils.js#L57 could match.