无法编译超过 73 个 block
ambar opened this issue · 12 comments
如果每个文件 3 个 block(config/style/template),约 25 个 mina 文件就会直接程序挂掉,毫无错误提示。暂时不知道是 webpack 本身问题还是其他。
巧了,刚好今天也在排查这个问题
好棒棒
为什么这里不直接parse而是调用loadModule parse呢?
https://github.com/tinajs/mina-webpack/blob/master/packages/mina-loader/lib/loaders/mina.js#L77
@huanghui1 直接 parse 的话是指?
https://github.com/tinajs/mina-webpack/blob/master/packages/mina-loader/lib/loaders/parser.js#L3
就是直接export parse
,调用parse
,没有试过不知道行不行:joy:
@huanghui1 噢! 我明白你意思了。一般情况下,这个地方直接读文件内容然后 parse
也是可以的,但用 loadModule
会更好。因为 loadModule
除了可以省去额外的读文件操作之外,还能够覆盖 request
(url) 中含其他 loader 的写法。比如:
<config>
{
usingComponents: {
'my-component': 'min-to-mina-loader!../components/wxc-icon.wxc', // 只是一个例子
}
}
</config>
I also meet this issue and make a demo to reproduce the bug :
https://github.com/malash/mina-webpack/blob/issue/example/src/pages/test.mina
Increasing parallelism
helped but can we solve the problem fundamentally ?
The root cause of the problem is this:
And I think the version that webpack resolved for this bug is 4.6.0:
Unfortunately, currently mina-webpack only supports webpack 3, so for the time being we can only increase the value of the parallelism
to avoid this problem.
This issue will remain open until we support webpack 4. Very sorry for the inconvenience.
就在刚刚碰到这个问题,好在已经有人发现了,不然就完蛋了