Я использую babel-loader, и вот часть моей конфигурации webpack:
loaders: [
{
test: /\.jsx?$/,
loader: 'babel-loader',
include: `${__dirname}/client`
},
{
test: /\.css$/,
loader: 'style-loader!css-loader'
}
]
Когда я создаю файл 35 МБ в файловой системе (не в директории клиента), я получаю такойпредупреждение: [BABEL] Note: The code generator has deoptimised the styling of "/private/var/folders/r4/hzf6lyx15sn9xxwtjt9qm6p10k3xrt/T/test.js" as it exceeds the max of "500KB".
И после этого я получаю JavaScript heap out of memory
исключение:
<--- Last few GCs --->
[71159:0x102801c00] 144167 ms: Mark-sweep 1398.0 (1467.2) -> 1398.0 (1467.7) MB, 2363.6 / 0.0 ms allocation failure GC in old space requested
[71159:0x102801c00] 146476 ms: Mark-sweep 1398.0 (1467.7) -> 1398.0 (1436.7) MB, 2309.0 / 0.0 ms last resort
[71159:0x102801c00] 148849 ms: Mark-sweep 1398.0 (1436.7) -> 1398.0 (1436.7) MB, 2373.4 / 0.0 ms last resort
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x14e8a28799 <JSObject>
1: push(this=0xe833d69a309 <JSArray[579629]>)
2: mark [/Users/user/projects/project/node_modules/babel-generator/lib/source-map.js:~59] [pc=0x3eba863dbf26](this=0x1e65686ecf11 <SourceMap map = 0x243b6e6739b1>,generatedLine=1,generatedColumn=18634482,line=1,column=18634484,identifierName=0x69ae1f02201 <null>,filename=0x69ae1f02201 <null>)
3: StringLiteral [/Users/user/projects...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
Why is babel looking not only in client dir?