page note found:
http://test/profiles/openatrium/themes/oa_basetheme/assets/js/oa_basethe...||1||profiles/openatrium/themes/oa_basetheme/assets/js/oa_basetheme.script.min.js.map

I found the reference below but no min.js.map file is in that directory

grep -in oa_basetheme.script.min.js.map -d recurse *
oa_basetheme/assets/js/oa_basetheme.script.min.js:113://# sourceMappingURL=oa_basetheme.script.min.js.map

suggest just removing it as per https://www.drupal.org/node/2400287

Comments

SocialNicheGuru created an issue. See original summary.

socialnicheguru’s picture

StatusFileSize
new304 bytes
mpotter’s picture

Fortunately this doesn't affect the actual operation of the site. It's only used by the browser when you want to debug the javascript that is minimized.

But yes, we recently changed our local scripts for compiling the theme/css/js code and looks like we didn't enable the option to strip out the re

Argus’s picture

Status: Active » Needs review

So is this patch applicable?

mpotter’s picture

Not really. I mean, it's a temp fix for people, but the *.min.js files are generated via our build process that compiles the css, performs linting, compresses, etc. Somewhere there is a config setting that would tell it not to add the map files, but I haven't touched the frontend tools in a while so would take some investigating. See the docs in the oa_basetheme readme on how the tools are setup.

jeffm2001’s picture

Why not just include the source map files? That was the approach taken in core: #2400675: Missing .map files causing 404 file not found errors

There's a line in .gitignore assets/*/*.map. (This happens for CSS too, btw). Is there some reason those files shouldn't exist on production sites?

mpotter’s picture

The reason .gitignore has entries for the *.map files is because small changes in either the css or js cause these map files to change and generates large "diffs" that make creating clean patches very difficult. It also makes team development difficult because you can run into more merge conflicts with map files. It is a normal "best practice" with version control to not include compiled assets like map files, or even the .min files themselves in many cases.

Also, the Core issue you referenced is from over a year ago. The current base-practice in D8 (and backporting to D7) is to remove the sourceMappingURL as mentioned in this issue: #2400287: Remove all occurences of sourceMappingURL and sourceURL when JS files are aggregated

mpotter’s picture

Status: Needs review » Fixed

I've manually removed the sourceMappingURL lines in both css and js for oa_basetheme and oa_theme. Added a PR to our front-end tools to add an option for the future. Until that gets done I'll try to remember to remove these lines manually after recompiling the sass files.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.