You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Webpack 2 is going to deprecate require.ensure() and System.import() in favor of import() for code splitting. import() syntax isn't specific to Webpack and it's currently an ES proposal at stage 3. So some projects might want to disallow usage of require.ensure() and System.import(), then they can easily switch to another module bundler or native implementation in the future. Currently, such requirement being discussed in the create-react-app project and there is an open issue facebook/create-react-app#1524.
So I'm thinking about two new rules like no-webpack-require-ensure andno-webpack-system-import to support this. But I would like to know everyone's thoughts on this before sending a PR.
The text was updated successfully, but these errors were encountered:
tharakawj
changed the title
New rules to forbid webpack require.ensure() and System.import
New rules to forbid webpack require.ensure() and System.import()
Feb 12, 2017
Webpack 2 is going to deprecate
require.ensure()
andSystem.import()
in favor ofimport()
for code splitting.import()
syntax isn't specific to Webpack and it's currently an ES proposal at stage 3. So some projects might want to disallow usage ofrequire.ensure()
andSystem.import()
, then they can easily switch to another module bundler or native implementation in the future. Currently, such requirement being discussed in the create-react-app project and there is an open issue facebook/create-react-app#1524.So I'm thinking about two new rules like
no-webpack-require-ensure
andno-webpack-system-import
to support this. But I would like to know everyone's thoughts on this before sending a PR.The text was updated successfully, but these errors were encountered: