Skip to content

mkarp/cljs-sourcemap-demo

Repository files navigation

This repo is a reproduction of an issue when ClojureScript compiler doesn't use sourcemaps with :optimizations option is set to :simple.

Update: Thanks to @pesterhazy for solving the issue in this pull request. Paulus also showed that the issue doesn't happen when using cljs.main in another pull request.

Steps to reproduce

Run the following command. It will build the *.cljs file without the optimizations:

lein dev && node compiled/first.js

This will produce a stacktrace mentioning the *.cljs files (full output can be seen at output-dev.txt):

[object Object]
    at Function.demo$first$_main (.../compiled/first.out/demo/first.cljs:4:11)
    ...

Then run the same command with optimizations enabled:

lein prod && node compiled/first.js

This will produce a stacktrace not mentioning the *.cljs files (full output can be seen at output-prod.txt):

Trace
    at Function.demo.first._main (.../compiled/first.js:2084:353)
    ...

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published