Uh oh!
There was an error while loading. Please reload this page.
Add lint rule to disallow require.ensure and System.import - #1536
Conversation
tharakawj
commented
Feb 12, 2017
CI build has failed because the |
Timer
commented
Feb 12, 2017
You can rebase onto #1538 if you'd like, CI should pass after. |
I'm not sure how to do it. I'll rebase this with master after #1538 is merged. |
Timer
commented
Feb 13, 2017
No problem. Thanks for the PR! |
Timer
commented
Feb 15, 2017
Hi @tharakawj! #1538 has been merged, could you please rebase this? 😄 |
tharakawj
commented
Feb 15, 2017
@Timer Done! |
gaearon
commented
Feb 15, 2017
The CI log says:
I'll just restart the build. |
tharakawj
commented
Feb 15, 2017
It passed! Thanks @gaearon |
There was a problem hiding this comment.
This should link to an explanation.
There was a problem hiding this comment.
People seeing this warning might not even be aware import() exists. We should link to some section that clearly explains how to use it.
There was a problem hiding this comment.
I don't believe we have docs for this yet. 🙈
@tharakawj, would you like to contribute some? 😄
There was a problem hiding this comment.
One pitfall is we won't want to merge that doc until 0.10 or we'll get tens of issues claiming the feature doesn't work. 😄
There was a problem hiding this comment.
We could add the link to the PR's changes/document for now and once it's merged switch it. 🤷♀️
There was a problem hiding this comment.
I'm happy to get this PR in as is if you create an umbrella issue for 0.10 mentioning adding the link (and doc) as todo items.
There was a problem hiding this comment.
@Timer yeah. I would love to. 😄 I can work on the doc. If you like we can add the link to webpack import() documentation for the time being
There was a problem hiding this comment.
A link to https://webpack.js.org/guides/code-splitting-import/#dynamic-import sounds good.
There was a problem hiding this comment.
Ok. I'll update the PR
@gaearon should we still allow webpack to parse |
gaearon
commented
Feb 22, 2017
I'm fine with this being a hard error. |
gaearon
commented
Feb 22, 2017
Unrelated, but how does #1538 work inside Jest? |
tharakawj
commented
Feb 22, 2017
@Timer Good point! I'll update the PR |
It doesn't, oops! But #1615 fixes that. Thanks @tharakawj! |
gaearon
commented
Feb 24, 2017
We can get this in? |
Timer
commented
Feb 24, 2017
Yup, I didn't catch the switch to |
Fixes#1524
Also, disallow
System.importas it has been deprecated in webpack 2.