Skip to content
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

JS/CSS: source maps #25

Open
calebdoxsey opened this issue May 20, 2015 · 5 comments
Open

JS/CSS: source maps #25

calebdoxsey opened this issue May 20, 2015 · 5 comments

Comments

@calebdoxsey
Copy link

Not sure if it's on your road map but source maps would be nice.

Competing tools already support them:

Personally I don't care so much about CSS source maps, but its pretty vital for Javascript debugging. Unfortunately source map generation can be tricky, especially when merging multiple files or going through several layers. (coffescript -> javascript -> merged javascript -> compressed javascript)

@tdewolff
Copy link
Owner

Good request, but not something I will attend to anytime soon though...

I'll put it on the roadmap!

@tdewolff tdewolff changed the title Source Maps? JS/CSS source maps Jul 25, 2015
@tdewolff tdewolff changed the title JS/CSS source maps JS/CSS: source maps Sep 21, 2015
@tdewolff
Copy link
Owner

@tdewolff tdewolff removed the ? label Nov 26, 2016
@Splizard
Copy link

Splizard commented Nov 3, 2020

Integrate https://github.com/evanw/esbuild ? It's written in Go.

(From the Readme)
Major features:

  • Extreme speed without needing a cache
  • ES6 and CommonJS modules
  • Tree shaking of ES6 modules
  • An API for JavaScript and Go
  • TypeScript and JSX syntax
  • Source maps
  • Minification

@tdewolff
Copy link
Owner

tdewolff commented Nov 4, 2020

The author of esbuild made it clear that he will not provide an API for libraries even though it was widely requested. This means minify can't incorporate esbuild. Another fact is that esbuild is meant for a complete JS source for a website, while minify doesn't make this assumption and works with individual files.

Otherwise:

  • Speed: minify performs better in terms of performance
  • Modules: not really relevant, but minify supports up to the latest ES version
  • Tree shaking: not relevant when handling individual files
  • API: not sure what that means
  • Typescript and JSX: not an objective of minify as these file formats are not accepted by browsers
  • Source maps: this is a fairly easy functionality to add, but there doesn't seem to be much demand to be honest
  • Minification: minify has better compression ratios than esbuild

So unfortunately, it isn't really feasible nor advantageous to integrate esbuild.

@trymeouteh
Copy link

trymeouteh commented May 6, 2024

Would like to see this feature for easier debugging with the option to have inline sourcemaps.

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

4 participants