Coder Social home page Coder Social logo

Comments (9)

jamesreggio avatar jamesreggio commented on July 1, 2024

+1

This seems wrong.

from uglifyify.

yoshuawuyts avatar yoshuawuyts commented on July 1, 2024

Hmh, that's odd. Does it cause any issues with source maps?

from uglifyify.

naorye avatar naorye commented on July 1, 2024

Not to me.

from uglifyify.

TheLudd avatar TheLudd commented on July 1, 2024

@yoshuawuyts I have noticed this as well, but only when I have source maps turned on. If I don't use source maps, the blank lines aren't there

from uglifyify.

derekr avatar derekr commented on July 1, 2024

Would it make sense to run a bundle that used uglifyify through uglifyjs?

from uglifyify.

kristoferjoseph avatar kristoferjoseph commented on July 1, 2024

I'm seeing this as well.

from uglifyify.

bholloway avatar bholloway commented on July 1, 2024

I believe this is caused by need for a line break before the source map comment.

In browserify the source map for each file is encoded as a trailing source map comment. This allows it to be passed between transforms without any additional data structure. When the browser-pack occurs, the comment is stripped from the individual files but the line break is not, leaving a blank line.

Unfortunately the line break is required for now. Browserify and its dependencies need to upgrade to convert-source-map@>=0.4.0 before the source map comment may be placed on the same line as the code.

This includes

  • insert-module-globals/combine-source-map/convert-source-map
  • browser-pack/convert-source-map.

from uglifyify.

rahatarmanahmed avatar rahatarmanahmed commented on July 1, 2024

What's the status of this issue? Both modules above are using a version of convert-source-map above 0.4.0.

from uglifyify.

yoshuawuyts avatar yoshuawuyts commented on July 1, 2024

I'm not too fussed about this. From the docs:

When using uglifyify you should generally also use Uglify, to achieve the smallest output

If this is not causing any source map issues then I'm not particularly seeing a problem here. However if anyone does however feel inclined to submit a patch, I'd be happy to review it. Cheers!

from uglifyify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.