You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A bug has hit me while I was trying to process webpack task. After adding a new file to a list of meged *.js an error has appeared:
webpack --mode=production --optimize-minimize
buffer.js:207
throw new ERR_INVALID_ARG_TYPE(
^
TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type undefined
at Function.from (buffer.js:207:11)
at writeOut (C:\_DATA\Projects\Inne\DopokiStarczyTchu.pl\DopokiStarczyTchu.pl\DopokiStarczyTchu.pl\node_modules\webpack\lib\Compiler.js:410:26)
at asyncLib.forEachLimit (C:\_DATA\Projects\Inne\DopokiStarczyTchu.pl\DopokiStarczyTchu.pl\DopokiStarczyTchu.pl\node_modules\webpack\lib\Compiler.js:426:7)
at objectIteratorWithKey (C:\_DATA\Projects\Inne\DopokiStarczyTchu.pl\DopokiStarczyTchu.pl\DopokiStarczyTchu.pl\node_modules\neo-async\async.js:3508:9)
at done (C:\_DATA\Projects\Inne\DopokiStarczyTchu.pl\DopokiStarczyTchu.pl\DopokiStarczyTchu.pl\node_modules\neo-async\async.js:3526:9)
at C:\_DATA\Projects\Inne\DopokiStarczyTchu.pl\DopokiStarczyTchu.pl\DopokiStarczyTchu.pl\node_modules\graceful-fs\graceful-fs.js:45:10
at FSReqWrap.oncomplete (fs.js:145:20)
The reason was using "let" and "const" in added "lazyload.2.x.js". After I has changed all instances to "var" the file has been merged successfully.
The fragment of my webpack config file:
@Demiurg-ls it it seems to be the js minifier problem maybe? the minifier seems to return undefined and passes it as content of file, my library merges the files in the order in the list as is, without wrapping them in new scope as opposed to using loaders, and this may cause conflicting variables issue which may be solved with const/let in this case, maybe you could try merging the files with conflicting variables into different final js files or seeing exactly what error does the minifer throw
Hi,
A bug has hit me while I was trying to process webpack task. After adding a new file to a list of meged *.js an error has appeared:
The reason was using "let" and "const" in added "lazyload.2.x.js". After I has changed all instances to "var" the file has been merged successfully.
The fragment of my webpack config file:
The text was updated successfully, but these errors were encountered: