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

Broken source maps #137

Closed
vladkosinov opened this issue Nov 4, 2015 · 6 comments
Closed

Broken source maps #137

vladkosinov opened this issue Nov 4, 2015 · 6 comments

Comments

@vladkosinov
Copy link

With new babel release I got flattened folder hierarchy 😱

Before:

Before

After:

After

Example: https://github.com/vlkosinov/babel-lodaer-source-map-issue-example

@zywind
Copy link

zywind commented Nov 5, 2015

Good to know I'm not the only one that this is happening to. I also don't see all the source files there.

@mctep
Copy link

mctep commented Nov 6, 2015

👍

@Mae5tr0
Copy link

Mae5tr0 commented Nov 6, 2015

1 similar comment
@dalyaka
Copy link

dalyaka commented Nov 6, 2015

@eur00t
Copy link
Contributor

eur00t commented Nov 9, 2015

@vlkosinov, I also have this problem and I made a patch which works for my project. I tested it for your example, babel6/public/app.js.map:

before

"sources":["webpack:///webpack/bootstrap d8405410e759e18a24c8","webpack:///index.js","webpack:///another-file-name.js"]

after

"sources":["webpack:///webpack/bootstrap d8405410e759e18a24c8","webpack:///./src/index.js","webpack:///./src/module1/index.js","webpack:///./src/module2/another-file-name.js"]

Looks like this is exactly what is also generated in babel5/.

@Couto Couto closed this as completed in #146 Nov 9, 2015
@Gvozd
Copy link

Gvozd commented Nov 12, 2015

I have some improvement

Before this change (not bad variant)

    "sources": [
        "webpack:///webpack/bootstrap f6790d4a4ba109d67350",
        "webpack:///main.js",
        "webpack:///any.js",
        "webpack:///Pattern.js",
        "webpack:///exc.js",
        "webpack:///opt.js",
        "webpack:///rep.js",
        "webpack:///seq.js",
        "webpack:///rgx.js",
        "webpack:///txt.js"
    ]

After this change(i not need absolut filesystem-path in my source-maps J)

    "sources": [
        "webpack:///webpack/bootstrap f6790d4a4ba109d67350",
        "webpack:///C:/Projects/parser/main.js",
        "webpack:///C:/Projects/parser/lib/combinators/any.js",
        "webpack:///C:/Projects/parser/lib/Pattern.js",
        "webpack:///C:/Projects/parser/lib/combinators/exc.js",
        "webpack:///C:/Projects/parser/lib/combinators/opt.js",
        "webpack:///C:/Projects/parser/lib/combinators/rep.js",
        "webpack:///C:/Projects/parser/lib/combinators/seq.js",
        "webpack:///C:/Projects/parser/lib/patterns/rgx.js",
        "webpack:///C:/Projects/parser/lib/patterns/txt.js"
    ]

My improvement(i look it at coffee-loader):
use sourceRoot: '', instead sourceRoot: process.cwd(),
After this improvement

    "sources": [
        "webpack:///webpack/bootstrap f6790d4a4ba109d67350",
        "webpack:///main.js",
        "webpack:///lib/combinators/any.js",
        "webpack:///lib/Pattern.js",
        "webpack:///lib/combinators/exc.js",
        "webpack:///lib/combinators/opt.js",
        "webpack:///lib/combinators/rep.js",
        "webpack:///lib/combinators/seq.js",
        "webpack:///lib/patterns/rgx.js",
        "webpack:///lib/patterns/txt.js"
    ],

I think this variant better that previous two

PS sorry for my bad english

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

No branches or pull requests

7 participants