Open smessmer opened 10 years ago
Thanks. Any chance of a sample project?
I tried to reproduce it with a small sample project but failed unfortunately.
But I could track it down a bit further. There have been file.js.src.js files hanging around in the /target/web/rjs/build/javascripts directory. I deleted the whole /target folder and ran the project again. The file.js.src.js files were not recreated and my problem was solved - no source maps served by the server anymore.
Maybe they've been there from an earlier compiler run where source maps have been enabled and rjs doesn't clean them up when you disable source maps without clean compile?
Yeah, I suppose if rjs kicks in then we must ensure that its build directory is cleared out first. WDYT @pvlugter ?
Using play 2.3.1.
My Build.scala looks like
The dependencies contain
and the plugin.sbt contains
I created an empty main.js to make requireJs work, but I'm not using it. I'm accessing javascript files directly using their path/filename.
In dev mode, the sources are non-minified. Accessing
path/file.js
returns the non-minified output from the compiler.Running the application in prod mode, it minifies the javascript sources correctly. Accessing
path/file.js
returns the minified javascript file. This is exactly what I want so far.However, the browser also requests the source map
path/file.js.src.js
and the server delivers it.Since I set
CoffeeScriptKeys.sourceMap := false
(see build file above), it doesn't deliver the coffee script file as source map anymore, but it still delivers the non-minified javascript file that is output by the coffeescript compiler.RjsKeys.generateSourceMaps := false
doesn't seem to make a difference.