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

Add async execution ability #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

romash1408
Copy link

Closes #2

@romash1408
Copy link
Author

romash1408 commented Dec 21, 2017

I see now that there should be ability to throw errors from .json.js for callback er, or Promise catch, becose now unhandled promises looks in console like
image
Also, try with console.error gives
image
something strange in the middle of webpack output, whithout filename and string of error.
Maybe add error argument to resolve callback, so in .json.js it will look like this?

var fs = require('fs')

module.exports = function(resolve) {
    fs.readdir(__dirname, (err, files) => {
        if (err) return resolve(err)

        // ...

        resolve(null, data)
    })
}

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

Successfully merging this pull request may close these issues.

1 participant