Skip to content

多页面保存热更新时 大概率出现 Maximum call stack size exceeded #2991

Closed
@GodStream

Description

@GodStream

Version

3.1.1

Reproduction link

https://github.com/GodStream/multi-vue-cli3.0-bug

Node and OS info

Node 10.13.0 / npm 6.4.1 / yarn 1.9.2 / Mac 10.14.1

Steps to reproduce

1、动态获取目录结构,生成多页面pages,historyApiFallback rewrites 配置
2、热更新时会堆栈溢出,利用 fix-memory-limit 增加了node 内存配置
3、实际上还是会出现问题

68% building 1/1 modules 0 active/Users/zpq/SJ-Project/zhuhong/yp-webapp-next/node_modules/tapable/lib/HookCodeFactory.js:32
                                fn = new Function(
                                     ^

RangeError: Maximum call stack size exceeded
    at new Function (<anonymous>)
    at AsyncSeriesHookCodeFactory.create (/Users/zpq/SJ-Project/zhuhong/yp-webapp-next/node_modules/tapable/lib/HookCodeFactory.js:32:10)
    at AsyncSeriesHook.compile (/Users/zpq/SJ-Project/zhuhong/yp-webapp-next/node_modules/tapable/lib/AsyncSeriesHook.js:24:18)
    at AsyncSeriesHook._createCall (/Users/zpq/SJ-Project/zhuhong/yp-webapp-next/node_modules/tapable/lib/Hook.js:24:15)
    at AsyncSeriesHook.lazyCompileHook [as callAsync] (/Users/zpq/SJ-Project/zhuhong/yp-webapp-next/node_modules/tapable/lib/Hook.js:153:21)
    at source.tapAsync (/Users/zpq/SJ-Project/zhuhong/yp-webapp-next/node_modules/enhanced-resolve/lib/ResultPlugin.js:16:26)
    at AsyncSeriesBailHook.eval [as callAsync] (eval at create (/Users/zpq/SJ-Project/zhuhong/yp-webapp-next/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:7:1)
    at Resolver.doResolve (/Users/zpq/SJ-Project/zhuhong/yp-webapp-next/node_modules/enhanced-resolve/lib/Resolver.js:235:16)
    at resolver.getHook.tapAsync (/Users/zpq/SJ-Project/zhuhong/yp-webapp-next/node_modules/enhanced-resolve/lib/NextPlugin.js:16:13)
    at AsyncSeriesBailHook.eval [as callAsync] (eval at create (/Users/zpq/SJ-Project/zhuhong/yp-webapp-next/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:7:1)
    at Resolver.doResolve (/Users/zpq/SJ-Project/zhuhong/yp-webapp-next/node_modules/enhanced-resolve/lib/Resolver.js:235:16)
    at Array.fs.stat (/Users/zpq/SJ-Project/zhuhong/yp-webapp-next/node_modules/enhanced-resolve/lib/FileExistsPlugin.js:29:14)
    at Storage.finished (/Users/zpq/SJ-Project/zhuhong/yp-webapp-next/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:43:16)
    at provider (/Users/zpq/SJ-Project/zhuhong/yp-webapp-next/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:79:9)
    at /Users/zpq/SJ-Project/zhuhong/yp-webapp-next/node_modules/graceful-fs/polyfills.js:285:20
    at FSReqWrap.oncomplete (fs.js:155:5)
error Command failed with exit code 1.

What is expected?

热更新正常

What is actually happening?

出现了 Maximum call stack size exceeded

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs team reproWe acknowledged your report and will soon try to reproduce it

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions