GithubHelp home page GithubHelp logo

kahlil / esnow Goto Github PK

View Code? Open in Web Editor NEW
24.0 24.0 3.0 48 KB

The FUTURE is now. Write future JavaScript now everywhere all the time in a snap!

Home Page: https://www.npmjs.com/package/esnow

License: MIT License

JavaScript 100.00%

esnow's People

Contributors

andreruffert avatar kahlil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

esnow's Issues

The -p option results in an invalid source map

When I run esnow -e main.es6 -o ./ -f index.js, it generates a fully working source map.
However, when I run esnow -e main.es6 -o ./ -f index.js -p, it generates an invalid source map where line numbers do not seem to correspond at all with the source files.

Specifically, when trying to debug index.js with Chrome dev tools, the source files are displayed correctly, but breakpoints and step-by-step debugging (by pressing F10) totally fail. For example:

  • Setting a breakpoint on some lines gets ignored by Chrome: no breakpoint mark is displayed.
  • On some other cases, breakpoint marks are displayed but when running, code stops at a totally different location.
  • Performing a step over a line can result in running the full code. Most probably this is because it will execute the line containing the full minified code.

These problems only manifest with the -p option. Everything works as expected when that option is not present and code is not minified.

Here is the content of minimal JS files used for testing:

main.es6:

import { hello } from './hello.es6';

let name = 'FooBar';
hello(name);

console.log('One');
console.log('Two');

console.log('Three');

hello.es6:

let hello = () => {
    console.log('Hello from main');
}

export { hello };

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.