Code Monkey home page Code Monkey logo

Comments (19)

GeeWee avatar GeeWee commented on August 24, 2024 2

I'd love if someone made a new version of this.

from babel-plugin-source-map-support.

chocolateboy avatar chocolateboy commented on August 24, 2024 2

Thanks, all, for your patience, patches and polite prompting. I've just published version 1.0.0 to NPM, which adds support for Babel >= 6.x (and removes support for Babel 5.x). Let me know if you spot any problems.

from babel-plugin-source-map-support.

michaelcontento avatar michaelcontento commented on August 24, 2024 1

@chocolateboy Is support for babel@6 planned?

from babel-plugin-source-map-support.

mariodu avatar mariodu commented on August 24, 2024 1

@chocolateboy , please publish a new version to npm.

from babel-plugin-source-map-support.

RobinQu avatar RobinQu commented on August 24, 2024 1

Forget the mess of babel.
Just use Typescript to save you from misery.

On Tue, Nov 1, 2016 at 7:11 PM, Sibelius Seraphini <[email protected]

wrote:

what is the progress on this?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#1 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAU6Fe2ttSP5SPbfrClxVJ8XNvY4aLRGks5q5x5xgaJpZM4GzFiS
.

from babel-plugin-source-map-support.

chocolateboy avatar chocolateboy commented on August 24, 2024

Is this plugin broken in Babel 6?

Yes. It hasn't been updated yet.

from babel-plugin-source-map-support.

chocolateboy avatar chocolateboy commented on August 24, 2024

Yes.

from babel-plugin-source-map-support.

gajus avatar gajus commented on August 24, 2024

Just in case, Babel 6 plugin would look like this:

import 'source-map-support/register';

/*
 * return the AST for this statement:
 *
 *     _sourceMapSupportRegister.install({ handleUncaughtException: true })
 */
function handleUncaughtExceptionNode(t, id) {
    return t.expressionStatement(
        t.callExpression(
            t.memberExpression(
                id,
                t.identifier('install')
            ), [
                t.objectExpression([
                    t.property(
                        'init',
                        t.identifier('handleUncaughtException'),
                        t.literal(true)
                    )
                ])
            ]
        )
    );
}

export default ({types: t}) => {
    return {
        visitor: {
            Program (path, {file}) {
                let id;

                id = file.addImport(
                    'source-map-support/register',
                    null,
                    'absolute'
                );
            }
        }
    };
};

I would also recommend replacing:

id = file.addImport(
   'source-map-support/register',
    null,
    'absolute'
);

with

id = file.addImport(
    require.resolve('source-map-support/register'),
    null,
    'absolute'
);

This will remove the need of the source-map-support peer dependency and since this transformation is used only in development, there is never a reasonable case where babel-plugin-source-map-support is not going to be installed and therefore require.resolve('source-map-support/register') unresolvable.

from babel-plugin-source-map-support.

chocolateboy avatar chocolateboy commented on August 24, 2024

@gajus I don't have time to dive into this at the moment. Feel free to submit a PR (against the develop branch).

from babel-plugin-source-map-support.

mariodu avatar mariodu commented on August 24, 2024

#3

from babel-plugin-source-map-support.

mykohsu avatar mykohsu commented on August 24, 2024

@mariodu Can you take a look at the error? Thanks.

It seems you have it working, so maybe I do not have correct dependencies. I made sure to install [email protected] and replaced the files for babel-plugin-source-map-support under node_modules.

from babel-plugin-source-map-support.

mariodu avatar mariodu commented on August 24, 2024

@mykohsu node version?

from babel-plugin-source-map-support.

mykohsu avatar mykohsu commented on August 24, 2024

Should be 5.4 or 5.5. I'll double check tomorrow.

from babel-plugin-source-map-support.

mykohsu avatar mykohsu commented on August 24, 2024

@mariodu Node is 4.2.6.

from babel-plugin-source-map-support.

shellscape avatar shellscape commented on August 24, 2024

@chocolateboy what's the status of this, has the module been abandoned?

@mariodu I tried your fork (babel-plugin-source-map-support-node-6) and it wasn't working with the latest version of babel 6 (on node 6.2.1). what's the trick to getting it working? is there a particular order that things need to be imported/required?

from babel-plugin-source-map-support.

chocolateboy avatar chocolateboy commented on August 24, 2024

@shellscape I just don't have time to update it at the moment. The document explaining the new way of doing things is pretty hefty, and I just haven't got round to reading it.

If someone creates a working update and prompts (OK, nags) me, then I will push a new version to NPM.

from babel-plugin-source-map-support.

shellscape avatar shellscape commented on August 24, 2024

I'll add it to my list, see if I can make a dent. Cheers

from babel-plugin-source-map-support.

sibelius avatar sibelius commented on August 24, 2024

what is the progress on this?

from babel-plugin-source-map-support.

joeyespo avatar joeyespo commented on August 24, 2024

Any plans to release with the merged #3 to npm?

from babel-plugin-source-map-support.

Related Issues (6)

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.