Skip to content

Source map support #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ethul opened this issue Aug 9, 2017 · 2 comments
Closed

Source map support #101

ethul opened this issue Aug 9, 2017 · 2 comments

Comments

@ethul
Copy link
Owner

ethul commented Aug 9, 2017

Raising this on purs-loader

See ethul/purescript-webpack-example#4

@ethul ethul changed the title Source map example Source map support Aug 9, 2017
@ethul
Copy link
Owner Author

ethul commented Aug 9, 2017

Update: we may need to specifically return the sourcemap:

this.callback(null, source, map);

ethul added a commit that referenced this issue Aug 12, 2017
ethul added a commit that referenced this issue Aug 12, 2017
* Adding source map support

Resolves #101

* Remove unused fs
@joprice
Copy link

joprice commented Sep 28, 2020

Is there an example of using this feature? I tried adding sourceMaps to the pscArgs, based on the line here

const isSourceMapsEnabled = options.pscArgs && options.pscArgs.sourceMaps;
, but I got an error that it's an invalid option:

pscArgs: {
  sourceMaps: true
}
ERROR in Invalid option `--source-maps'

Usage: purs COMMAND
  The PureScript compiler and tools

Using codegen: "js,sourcemaps" seems to work to produce the map files in the output folder, but I can't get them to wind up in the dist/ folder when running webpack, or to work with the dev server. I tried using the source-map-loader as well, but the files don't seem to be recognized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants