question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: expose errors to plugins

See original GitHub issue

By now errors in Webpack is handled like this, an error message:

        errors: function(errors) {
            status.text("App updated with errors. No reload!");
            okness.text("Errors while compiling.");
            $errors.text("\n" + stripAnsi(errors.join("\n\n\n")) + "\n\n");
            header.css({borderColor: "#ebcb8b"});
            $errors.show(); iframe.hide();
        },

If that code is exposed then we may get error messages like this with plugins, and it can be quite convenient, as it already was in ClojureScript projects.


update:

I made a prototype https://github.com/mvc-works/webpack-hud

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
SpaceK33zcommented, Nov 5, 2016

I exposed some events to the window now with 06c7773e9b6a0e3dbe43e53f605dbc221edc4e29. An example of how to use it:

window.addEventListener('message', function onWebpackMessage (msg) {
    if (!msg.data || !msg.data.type) return;
    switch(msg.data.type) {
        case 'webpackOk':
            console.log('bundle compiled ok');
            break;
        case 'webpackErrors':
            console.log('There were some errors', msg.data.data);
            break;
    }
}, false);

Let me know if you have any feedback. It’s not released yet.

0reactions
SpaceK33zcommented, Nov 7, 2016

Closing this since the feature has been implemented. Let me know if you don’t like the API or want to make some changes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

show complition errors via browserSync fullscreen message ...
Hi! Thx for browser-sync-webpack-plugin! I got an idea: show error overlay , when webpack done compliation with errors.
Read more >
[Feature request] Report errors when loading Python plugins
When a Python action plugin raises an exception during initialization, this error is silently ignored by Pcbnew. This has two consequences:.
Read more >
Feature Request: Allow us to see the Change Log for plugins
I assume you store your plugin code in some code repository. Would it be possible to expose the changelog for the plugin repo...
Read more >
Feature request | WordPress.org
Currently, the plugin only has feature to run code on front end or backend only. ... That's because code that runs for Woocommerce...
Read more >
Common WordPress Errors and Access Logs - Support Center
A list common error codes you may see on your WordPress site and why these error codes happen and common troubleshooting steps for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found