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

Fix webpack support #159

Merged
merged 5 commits into from
Jan 15, 2017
Merged

Fix webpack support #159

merged 5 commits into from
Jan 15, 2017

Conversation

kpdecker
Copy link
Contributor

This converts the webpack errors to warnings. Individual users may use the ignore plugin to further mute these warnings.

@LinusU
Copy link
Collaborator

LinusU commented Nov 28, 2016

Awesome, thank you!

@LinusU
Copy link
Collaborator

LinusU commented Nov 28, 2016

Hmm, seems like the tests are failing, any idea why?

@kpdecker
Copy link
Contributor Author

kpdecker commented Nov 28, 2016 via email

@LinusU
Copy link
Collaborator

LinusU commented Nov 28, 2016

I don't think we should drop 0.10 or 0.12 support without cutting a major release...

@kpdecker
Copy link
Contributor Author

kpdecker commented Nov 28, 2016 via email

This converts the webpack errors to warnings. Individual users may use the ignore plugin to further mute these warnings.

Fixes evanw#150
Fixes evanw#153
@kpdecker
Copy link
Contributor Author

@LinusU as always, sorry for the delay. Two issues with the tests:

  1. I missed a fs reference in the PR
  2. Node 7 changed the way that it names stack frames under for eval (Seen in master as well)

Both are fixed with the latest version of the PR. I have not changed anything WRT version, etc.

if (!contents && fs.existsSync(source)) {
contents = fs.readFileSync(source, 'utf8');
try {
const fs = require('fs');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be var to not upset any old browsers? Maybe we can move the try/catch to the top of the file even 🤔

var fs
try {
  fs = require('fs')
} catch (_) {
  // Loading in catch block to convert webpack error to warning.
}
    if (!contents && fs && fs.existsSync(source)) {
      contents = fs.readFileSync(source, 'utf8');

@LinusU
Copy link
Collaborator

LinusU commented Dec 28, 2016

This is amazing 😍 only one small nit, then it's good to go!

@kpdecker
Copy link
Contributor Author

@LinusU done.

@LinusU
Copy link
Collaborator

LinusU commented Jan 15, 2017

Thank you!

@LinusU LinusU merged commit 907c602 into evanw:master Jan 15, 2017
@LinusU
Copy link
Collaborator

LinusU commented Jan 15, 2017

Released as 0.4.9

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.

2 participants