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 support for dynamic import & disable require.ensure #1538

Merged
merged 7 commits into from
Feb 15, 2017

Conversation

Timer
Copy link
Contributor

@Timer Timer commented Feb 12, 2017

This PR enables babel syntax support for import() and disables require.ensure support within webpack.

It also updates the required internal files.

@Timer Timer added this to the 0.10.0 milestone Feb 12, 2017
@Timer Timer changed the title Disable require.ensure Add support for dynamic import & disable require.ensure Feb 12, 2017
@Timer Timer mentioned this pull request Feb 12, 2017
5 tasks
@Timer Timer mentioned this pull request Feb 12, 2017
package.json Outdated
@@ -11,7 +11,7 @@
"test": "node packages/react-scripts/scripts/test.js --env=jsdom"
},
"devDependencies": {
"babel-eslint": "6.1.2",
"babel-eslint": "7.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

latest is 7.1.1, could as well use that.

"eslint-plugin-jsx-a11y": "2.2.2",
"eslint-plugin-react": "6.3.0",
"babel-eslint": "7.1.0",
"eslint": "3.8.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

latest is 3.15.0

"babel-eslint": "7.1.0",
"eslint": "3.8.1",
"eslint-config-react-app": "0.5.1",
"eslint-plugin-flowtype": "2.21.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

latest is 2.30.0

"eslint": "3.8.1",
"eslint-config-react-app": "0.5.1",
"eslint-plugin-flowtype": "2.21.0",
"eslint-plugin-import": "2.0.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

latest is 2.2.0

@Timer
Copy link
Contributor Author

Timer commented Feb 12, 2017

I tried to keep versions near https://github.com/facebookincubator/create-react-app/blob/master/packages/eslint-config-react-app/package.json since typically we employ exact versions (I forget why it was relaxed in that package); since this is strictly for development tho it might not hurt to bump them.

Same reasoning for #1544.

@bondz
Copy link
Contributor

bondz commented Feb 12, 2017

Yes, that is the reason I was hoping to have them as the latest version, to avoid the number of duplicate dependencies package managers have to install, like the issues yarn has with modules. Don't think it matters though since they're all peer-deps in that package.

@Timer
Copy link
Contributor Author

Timer commented Feb 12, 2017

note: these deps are only when you're developing on this package locally, it has no effect on create-react-app installs.

We can prob bump them.

@bondz
Copy link
Contributor

bondz commented Feb 12, 2017

Oh, okay 👍

@Timer
Copy link
Contributor Author

Timer commented Feb 15, 2017

:shipit:

@Timer Timer merged commit fc49946 into facebook:master Feb 15, 2017
@Timer Timer deleted the require-ensure branch February 15, 2017 01:51
@douglasmamilor
Copy link

@Timer Sorry if this is newbie question but this change isn't reflected in the current npm package right?

@gaearon
Copy link
Contributor

gaearon commented Feb 20, 2017

No, this is tagged as 0.10.0:

screen shot 2017-02-20 at 14 28 35

The last released version is 0.9.0 (you can check the releases page).

@douglasmamilor
Copy link

@gaearon Got it! Thanks!

danielfigueiredo pushed a commit to danielfigueiredo/create-react-app that referenced this pull request Feb 22, 2017
* Disable require.ensure

* Replace require.ensure with import

* Add babel plugin for parsing import()

* Get the default

* Upgrade babel-eslint to support dynamic import

* Fix dep

* Update deps
kst404 pushed a commit to kst404/e8e-react-scripts that referenced this pull request Mar 2, 2017
* Disable require.ensure

* Replace require.ensure with import

* Add babel plugin for parsing import()

* Get the default

* Upgrade babel-eslint to support dynamic import

* Fix dep

* Update deps
SpaceK33z pushed a commit to CodeYellowBV/create-react-cy-app that referenced this pull request Mar 7, 2017
* Disable require.ensure

* Replace require.ensure with import

* Add babel plugin for parsing import()

* Get the default

* Upgrade babel-eslint to support dynamic import

* Fix dep

* Update deps

# Conflicts:
#	package.json
#	packages/babel-preset-react-app/package.json
#	packages/babel-preset-react-cy-app/index.js
#	packages/react-cy-scripts/config/webpack.config.dev.js
#	packages/react-cy-scripts/config/webpack.config.prod.js
@gaearon
Copy link
Contributor

gaearon commented May 16, 2017

Please help beta test the new version that includes this change!
#2172

@lock lock bot locked and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants