I am currently using Magento 2.2.2 and all is fine with JS bundling and minifying off.
However, when I enable js bundling I get a JavaScript error. I think this is related to a require.js config file. This error only appears when bundling.
When inspecting the compiled js file I notice there is an empty js build component. Where is this built from and what steps should I go about resolving this?
If I remove the empty js build manually from the compiled js file, there are no problems.
- 
 Did you find an answer to this problem? I am facing the same issue.klaaskox– klaaskox2019年08月06日 08:13:30 +00:00Commented Aug 6, 2019 at 8:13
- 
 This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. - From ReviewRohan Hapani– Rohan Hapani2019年08月06日 08:48:02 +00:00Commented Aug 6, 2019 at 8:48
1 Answer 1
In my case it was caused by a utf8_encode error on a copyright-character in requirejs-config.js in the Mageplaza/Core module.
When Magento creates the bundle files it uses json_encode($contents, JSON_UNESCAPED_SLASHES) to create the json string for the bundle. When this fails, it returns an empty string without showing any errors.