#2531 JS Source Maps

SlimerDude Thu 14 Apr 2016

Taking sys::Str as an example, compilerJs::JsPod specifies the location of the source map to be:

/pod/sys/sys.js.map

compilerJs::SourceMap then gives the location of the Fantom source as:

/dev/sys/Str.fan

But as /pod/sys/* already serves up pod resources, and given Fantom source is already included in the pod, would it not make more sense for SourceMap to give a source location of:

/pod/sys/src/Str.fan

That way there's no need to set up a second handler on the web server to handle /dev/ requests as the /pod/ handler could handle it all.

SlimerDude Mon 23 May 2016

How about it?

As in, how about changing compilerJs::SourceMap to set the location of Fantom source to /pod/* so they are served from the same url as source maps?

I ask because it affects BedSheet. If src continues to be served from dev/ then I need to create an extra handler to process dev/ urls.

If it is changed to pod/ then I don't have to do anything as pod/* urls are already handled - see PodHandler.

brian Tue 24 May 2016

The reason its separate from "pod/" URIS is because for many situations you don't want to serve the source from the pods, but rather from the file system. Consider development of commercial software where you would never package the source into the pods. Having it under a clear path provides the most flexibility to customize your environment for how it is served up.

Login or Signup to reply.