baler
baler copied to clipboard
Add new line after sourceMapingUrl
New line is missing after sourceMappingURL
hint causing next merged file be on the same line as the comment:
// some code
gento_Theme/js/theme"]})}(require);
//# sourceMappingURL=requirejs-bundle-config.js.map;try { <==== this is a problem
if (!window.localStorage || !window.sessionStorage) {
throw new Error();
}
localStorage.setItem('storage_test', 1);
localStorage.removeItem('storage_test');
Steps to reproduce:
- Install Baler, Magento Baler module;
- Fulfil Baler requirements: JS bundling, minification are disabled;
- Generate static and Baler bundles;
- Generated
requirejs-bundle-config.js
andbalerbundles/core-bundle.js
have no new line in the end - Merged JS files are invalid.
Thanks for the report @boldhedgehog!
To make sure I understand, are you concatenating both requirejs-bundle-config.js
and balerbundles/core-bundle.js
together yourself?
@DrewML no, this is the standard Magento JS merging (not bundling). I don't know if you have control over this, but I think you can just disable this hint, it is not valid for when the files are merged anyways.