Después de actualizar de Webpacker 4 a 5, recibo un nuevo error al ejecutar Rails webpacker:compile. Ejecución de desarrollo de hilo, solo; funciona sin problemas: parece que no puedo encontrar la causa de este error o en qué archivo se encuentra. No hay muchas herramientas de depuración en este caso. ¿Cómo soluciono el problema donde splitChunks falla para webpacker 5?
Error:
➜ rails webpacker:compile warning: parser/current is loading parser/ruby27, which recognizes warning: 2.7.3-compliant syntax, but you are running 2.7.4. warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri. I, [2022-01-04T14:59:51.4223 #20612] INFO -- : initializing Lit Compiling... Compilation failed: [webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. - configuration.optimization.splitChunks should be one of these: false | object { automaticNameDelimiter?, cacheGroups?, chunks?, defaultSizeTypes?, enforceSizeThreshold?, fallbackCacheGroup?, filename?, hidePathInfo?, maxAsyncRequests?, maxAsyncSize?, maxInitialRequests?, maxInitialSize?, maxSize?, minChunks?, minRemainingSize?, minSize?, minSizeReduction?, name?, usedExports? } -> Optimize duplication and caching by splitting chunks by shared modules and cache group. Details: * configuration.optimization.splitChunks.name should be one of these: false | string | function -> Give chunks created a name (chunks with equal name are merged). Details: * configuration.optimization.splitChunks.name should be false. * configuration.optimization.splitChunks.name should be a string. * configuration.optimization.splitChunks.name should be an instance of function.No sé cuáles son sus configuraciones, pero el problema está en su configuration.optimization.splitChunks.name es algo diferente a falso, cadena o instancia de función