Upgrade to webpack v2 #1291

Merged
merged 15 commits into from Feb 11, 2017

Conversation

@Timer
Collaborator

Timer commented Dec 18, 2016

},
// JSON is not enabled by default in Webpack but both Node and Browserify
// allow it implicitly so we also enable it.
{
test: /\.json$/,
- loader: 'json'
+ loader: 'json-loader'

This comment has been minimized.

@bondz

bondz Dec 18, 2016

Contributor

json-loader is no longer required in Webpack 2

@bondz

bondz Dec 18, 2016

Contributor

json-loader is no longer required in Webpack 2

This comment has been minimized.

@Timer

Timer Dec 18, 2016

Collaborator

Thanks!

@Timer

Timer Dec 18, 2016

Collaborator

Thanks!

This comment has been minimized.

@bondz

bondz Dec 18, 2016

Contributor

You should take it out of the package.json file as well.

@bondz

bondz Dec 18, 2016

Contributor

You should take it out of the package.json file as well.

@@ -81,12 +81,12 @@ module.exports = {
// We use `fallback` instead of `root` because we want `node_modules` to "win"

This comment has been minimized.

@bondz

bondz Dec 18, 2016

Contributor

Should the comment change?

@bondz

bondz Dec 18, 2016

Contributor

Should the comment change?

This comment has been minimized.

@Timer

Timer Dec 18, 2016

Collaborator

Probably -- we don't need people to be confused.

@Timer

Timer Dec 18, 2016

Collaborator

Probably -- we don't need people to be confused.

@@ -134,7 +134,7 @@ module.exports = {
/\.json$/,
/\.svg$/
],
- loader: 'url',
+ loader: 'url-loader',
query: {

This comment has been minimized.

@bondz

bondz Dec 18, 2016

Contributor

Although webpack 2 allows query, it has chosen to use options in its docs which IMO is better, would you consider changing?

@bondz

bondz Dec 18, 2016

Contributor

Although webpack 2 allows query, it has chosen to use options in its docs which IMO is better, would you consider changing?

+ // splitting or minification in interest of speed. These warnings become
+ // cumbersome.
+ performance: {
+ hints: false

This comment has been minimized.

@bondz

bondz Dec 19, 2016

Contributor

Since this is turned off completely during development and by default set to warning in the production config, it might come as a surprise to users to then have to tweak their app for code-splitting, although extracting css should bring the file size down. @TheLarkInn gives a reason to leave it enabled in dev builds. We could tweak the maxAssetSize and maxEntrypointSize options to reasonable file sizes instead. What do you think?

@bondz

bondz Dec 19, 2016

Contributor

Since this is turned off completely during development and by default set to warning in the production config, it might come as a surprise to users to then have to tweak their app for code-splitting, although extracting css should bring the file size down. @TheLarkInn gives a reason to leave it enabled in dev builds. We could tweak the maxAssetSize and maxEntrypointSize options to reasonable file sizes instead. What do you think?

This comment has been minimized.

@Timer

Timer Dec 19, 2016

Collaborator

I don't think it's very valuable in its certain form -- I think we need to go a step further and show our own warnings more in line with what @TheLarkInn was saying.

Currently, we don't display build size warnings -- and bundle size is going to vary wildly between end-users. I don't think there is a good "default" we can set which will cover all cases (and we don't want to expose configuration unless it's a feature we want to support for the foreseeable future of cra; even if we switch bundlers).

Knowing this, I think that monitoring build size between rebuilds would be beneficial to let the user know their bundle has grown -- maybe doing some caching so we can display warnings between restarts/sessions.

Since the feature isn't there now, I think we can safely disable it completely until we implement said feature or wait for more detailed [json] performance hints from webpack.

@Timer

Timer Dec 19, 2016

Collaborator

I don't think it's very valuable in its certain form -- I think we need to go a step further and show our own warnings more in line with what @TheLarkInn was saying.

Currently, we don't display build size warnings -- and bundle size is going to vary wildly between end-users. I don't think there is a good "default" we can set which will cover all cases (and we don't want to expose configuration unless it's a feature we want to support for the foreseeable future of cra; even if we switch bundlers).

Knowing this, I think that monitoring build size between rebuilds would be beneficial to let the user know their bundle has grown -- maybe doing some caching so we can display warnings between restarts/sessions.

Since the feature isn't there now, I think we can safely disable it completely until we implement said feature or wait for more detailed [json] performance hints from webpack.

This comment has been minimized.

@bondz

bondz Dec 19, 2016

Contributor

I agree πŸ‘

@bondz

bondz Dec 19, 2016

Contributor

I agree πŸ‘

This comment has been minimized.

@existentialism

existentialism Jan 13, 2017

Contributor

Just a note, performance hints are now off by default in rc4:
https://github.com/webpack/webpack/releases/tag/v2.2.0-rc.4

@existentialism

existentialism Jan 13, 2017

Contributor

Just a note, performance hints are now off by default in rc4:
https://github.com/webpack/webpack/releases/tag/v2.2.0-rc.4

This comment has been minimized.

@bondz

bondz Jan 13, 2017

Contributor

Should this be set to warning in production now?

@bondz

bondz Jan 13, 2017

Contributor

Should this be set to warning in production now?

This comment has been minimized.

@TheLarkInn

TheLarkInn Jan 23, 2017

What kind of additional details are you looking for? At the least I'd recommend having it as "warning" in Production as well.

@TheLarkInn

TheLarkInn Jan 23, 2017

What kind of additional details are you looking for? At the least I'd recommend having it as "warning" in Production as well.

@bondz

Remove unused json-loader from the package.json file.

- {
- test: /\.json$/,
- loader: 'json'
+ loader: 'style-loader!css-loader?importLoaders=1!postcss-loader'

This comment has been minimized.

@bondz

bondz Dec 19, 2016

Contributor

To apply multiple loaders, webpack 2 uses the use option.

@bondz

bondz Dec 19, 2016

Contributor

To apply multiple loaders, webpack 2 uses the use option.

This comment has been minimized.

@Timer

Timer Dec 19, 2016

Collaborator

Out of curiosity, is this old syntax still supported?

@Timer

Timer Dec 19, 2016

Collaborator

Out of curiosity, is this old syntax still supported?

This comment has been minimized.

@bondz

bondz Dec 19, 2016

Contributor

Doesn't seem to work. webpack treats the whole string as a single loader throwing a Module not found: Error: Can't resolve ...

@bondz

bondz Dec 19, 2016

Contributor

Doesn't seem to work. webpack treats the whole string as a single loader throwing a Module not found: Error: Can't resolve ...

This comment has been minimized.

@gaearon

gaearon Dec 19, 2016

Member

Nice! (That syntax is so confusing.)

@gaearon

gaearon Dec 19, 2016

Member

Nice! (That syntax is so confusing.)

This comment has been minimized.

@bondz

bondz Dec 19, 2016

Contributor

use

use: [
  'style-loader', 
  {
    loader: 'css-loader',
    options: {
      importLoaders: 1
    }
  },
  'postcss-loader'
]
@bondz

bondz Dec 19, 2016

Contributor

use

use: [
  'style-loader', 
  {
    loader: 'css-loader',
    options: {
      importLoaders: 1
    }
  },
  'postcss-loader'
]
@existentialism

This comment has been minimized.

Show comment
Hide comment
@existentialism

existentialism Dec 19, 2016

Contributor

Probably need to bump a few deps for peerDep warnings:

And wait for some pending version bumps:

Contributor

existentialism commented Dec 19, 2016

Probably need to bump a few deps for peerDep warnings:

And wait for some pending version bumps:

@@ -213,6 +187,30 @@ module.exports = {
inject: true,
template: paths.appHtml,
}),
+ new webpack.LoaderOptionsPlugin({

This comment has been minimized.

@gaearon

gaearon Dec 19, 2016

Member

Ideally we shouldn't have this section and instead pass options to loaders. (If those loaders support the new API.)

@gaearon

gaearon Dec 19, 2016

Member

Ideally we shouldn't have this section and instead pass options to loaders. (If those loaders support the new API.)

- loader: ExtractTextPlugin.extract('style', 'css?importLoaders=1!postcss')
+ loader: ExtractTextPlugin.extract({
+ fallbackLoader: 'style-loader',
+ loader: 'css-loader?importLoaders=1!postcss-loader'

This comment has been minimized.

@bondz

bondz Dec 19, 2016

Contributor

This could also be written as

loader: [
            {
              loader: 'css-loader',
              options: {
                importLoaders: 1
              }
            },
            'postcss-loader'
          ]
@bondz

bondz Dec 19, 2016

Contributor

This could also be written as

loader: [
            {
              loader: 'css-loader',
              options: {
                importLoaders: 1
              }
            },
            'postcss-loader'
          ]
@bondz

This comment has been minimized.

Show comment
Hide comment
@bondz

bondz Dec 20, 2016

Contributor

Some other dependencies are outdated, should those deps be updated as well? In a separate PR, I could send one.

Contributor

bondz commented Dec 20, 2016

Some other dependencies are outdated, should those deps be updated as well? In a separate PR, I could send one.

@Timer

This comment has been minimized.

Show comment
Hide comment
@Timer

Timer Dec 20, 2016

Collaborator

Some other dependencies are outdated, should those deps be updated as well? In a separate PR, I could send one.

I've always wondered the same and if we should track these dependencies through their new versions.
I feel like the general consensus is if it works, leave it as it is. If we update dependencies we might introduce breakages due to bugs in package updates.
To update dependencies safely, we need extensive unit testing beyond the current smoke test -- this is on the horizon.

Collaborator

Timer commented Dec 20, 2016

Some other dependencies are outdated, should those deps be updated as well? In a separate PR, I could send one.

I've always wondered the same and if we should track these dependencies through their new versions.
I feel like the general consensus is if it works, leave it as it is. If we update dependencies we might introduce breakages due to bugs in package updates.
To update dependencies safely, we need extensive unit testing beyond the current smoke test -- this is on the horizon.

@wtgtybhertgeghgtwtg

This comment has been minimized.

Show comment
Hide comment
@wtgtybhertgeghgtwtg

wtgtybhertgeghgtwtg Dec 21, 2016

Contributor

Would that mean enabling Greenkeeper after #1187 lands?

Contributor

wtgtybhertgeghgtwtg commented Dec 21, 2016

Would that mean enabling Greenkeeper after #1187 lands?

@Timer

This comment has been minimized.

Show comment
Hide comment
@Timer

Timer Dec 21, 2016

Collaborator

We'll have to open a discussion issue about it -- I can think of plenty of reasons to argue for and against it.
However, with an appropriate test suite, I don't believe it could hurt.


Anyway, this PR is currently blocked on waiting for a few dependencies to update. Hopefully webpack 2.x is fully released by this time. πŸ˜„

Collaborator

Timer commented Dec 21, 2016

We'll have to open a discussion issue about it -- I can think of plenty of reasons to argue for and against it.
However, with an appropriate test suite, I don't believe it could hurt.


Anyway, this PR is currently blocked on waiting for a few dependencies to update. Hopefully webpack 2.x is fully released by this time. πŸ˜„

@kpuputti

This comment has been minimized.

Show comment
Hide comment
@kpuputti

kpuputti Jan 4, 2017

The linked html-webpack-plugin PR is now merged and released, so that dependency can be checked. \o/

kpuputti commented Jan 4, 2017

The linked html-webpack-plugin PR is now merged and released, so that dependency can be checked. \o/

@Timer

This comment has been minimized.

Show comment
Hide comment
@Timer

Timer Jan 5, 2017

Collaborator

Neat, thanks for the update @kpuputti!

Collaborator

Timer commented Jan 5, 2017

Neat, thanks for the update @kpuputti!

@existentialism

This comment has been minimized.

Show comment
Hide comment
@existentialism

existentialism Jan 13, 2017

Contributor

Can bump to extract-text-plugin@v2.0.0-beta.5 now! πŸ™Œ

(Should continue tracking a few blockers to release tho)

Contributor

existentialism commented Jan 13, 2017

Can bump to extract-text-plugin@v2.0.0-beta.5 now! πŸ™Œ

(Should continue tracking a few blockers to release tho)

@kirkaustin

This comment has been minimized.

Show comment
Hide comment
@kirkaustin

kirkaustin Jan 18, 2017

Webpack 2.2.0 has been released.

Webpack 2.2.0 has been released.

@Timer

This comment has been minimized.

Show comment
Hide comment
@Timer

Timer Jan 19, 2017

Collaborator

Thanks @existentialism -- I've added the biggest two blockers for us to the OP.


Thanks @kirkaustin, I've updated this PR accordingly. πŸ‘

Collaborator

Timer commented Jan 19, 2017

Thanks @existentialism -- I've added the biggest two blockers for us to the OP.


Thanks @kirkaustin, I've updated this PR accordingly. πŸ‘

@thibaudcolas thibaudcolas referenced this pull request in springload/frontend-starter-kit Jan 19, 2017

Closed

Switch to webpack 2 #8

@gaearon gaearon added this to the 0.10.0 milestone Jan 23, 2017

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Jan 23, 2017

Member

Tagging this for 0.10 together with other major features.

Member

gaearon commented Jan 23, 2017

Tagging this for 0.10 together with other major features.

packages/react-scripts/package.json
- "webpack": "1.14.0",
- "webpack-dev-server": "1.16.2",
+ "webpack": "2.2.0",
+ "webpack-dev-server": "2.2.0-rc.0",

This comment has been minimized.

@SpaceK33z

SpaceK33z Jan 25, 2017

Contributor

webpack-dev-server 2.2.0 was released a few days ago :).

@SpaceK33z

SpaceK33z Jan 25, 2017

Contributor

webpack-dev-server 2.2.0 was released a few days ago :).

@andreypopp andreypopp referenced this pull request in pnpm/pnpm Jan 30, 2017

Closed

0.51.1 regressed on CRA based apps #581

+ loader: [
+ {
+ loader: 'css-loader',
+ query: {

This comment has been minimized.

@bachstatter

bachstatter Feb 1, 2017

query -> options?

@bachstatter

bachstatter Feb 1, 2017

query -> options?

This comment has been minimized.

@Timer

Timer Feb 3, 2017

Collaborator

That change is pending on webpack-contrib/extract-text-webpack-plugin#281, which I believe has gone through.

@Timer

Timer Feb 3, 2017

Collaborator

That change is pending on webpack-contrib/extract-text-webpack-plugin#281, which I believe has gone through.

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Feb 2, 2017

Member

Is anything still blocking this?

Member

gaearon commented Feb 2, 2017

Is anything still blocking this?

@bondz

This comment has been minimized.

Show comment
Hide comment
@bondz

bondz Feb 2, 2017

Contributor

Looks like all known issues have been resolved. Just a few more suggested changes by reviewers. But extract-text-webpack-plugin seems to have some bugs with webpack 2.2, we should probably wait for it's stable release.

Contributor

bondz commented Feb 2, 2017

Looks like all known issues have been resolved. Just a few more suggested changes by reviewers. But extract-text-webpack-plugin seems to have some bugs with webpack 2.2, we should probably wait for it's stable release.

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Feb 2, 2017

Member

But extract-text-webpack-plugin seems to have some bugs with webpack 2.2, we should probably wait for it's stable release.

πŸ‘

Can you compile a list of known issues for 2.x?

Member

gaearon commented Feb 2, 2017

But extract-text-webpack-plugin seems to have some bugs with webpack 2.2, we should probably wait for it's stable release.

πŸ‘

Can you compile a list of known issues for 2.x?

@bondz

This comment has been minimized.

Show comment
Hide comment
@bondz

bondz Feb 2, 2017

Contributor

It looks like the api would change in the stable release - webpack-contrib/extract-text-webpack-plugin#382

Also, these could affect some users.

Contributor

bondz commented Feb 2, 2017

It looks like the api would change in the stable release - webpack-contrib/extract-text-webpack-plugin#382

Also, these could affect some users.

@Timer

This comment has been minimized.

Show comment
Hide comment
@Timer

Timer Feb 2, 2017

Collaborator

I'll sit down and bring this PR up-to-date tonight.

Collaborator

Timer commented Feb 2, 2017

I'll sit down and bring this PR up-to-date tonight.

@jthegedus jthegedus referenced this pull request in gatsbyjs/gatsby Feb 6, 2017

Closed

Show javascript errors in overlay #582

@EnoahNetzach

This comment has been minimized.

Show comment
Hide comment
@EnoahNetzach

EnoahNetzach Feb 6, 2017

Contributor

@Timer I used to have it only ofter an unsuccesful/inconsistent eject.
It could have something to do with devdep not getting installed (another recurring problem I have somewhere else).

I'll try to get some time to try it locally later this evening.

Contributor

EnoahNetzach commented Feb 6, 2017

@Timer I used to have it only ofter an unsuccesful/inconsistent eject.
It could have something to do with devdep not getting installed (another recurring problem I have somewhere else).

I'll try to get some time to try it locally later this evening.

@Timer

This comment has been minimized.

Show comment
Hide comment
@Timer

Timer Feb 6, 2017

Collaborator

@bondz
I don't think webpack-contrib/extract-text-webpack-plugin#307 affects us because we only use extract-text-webpack-plugin in production, not development, so watch mode isn't utilized in conjunction with the plugin.

There has been no movement on webpack-contrib/extract-text-webpack-plugin#294 so I think we're going to need to figure out a reproducing case and fix it ourselves / pass off to @bebraw.

Collaborator

Timer commented Feb 6, 2017

@bondz
I don't think webpack-contrib/extract-text-webpack-plugin#307 affects us because we only use extract-text-webpack-plugin in production, not development, so watch mode isn't utilized in conjunction with the plugin.

There has been no movement on webpack-contrib/extract-text-webpack-plugin#294 so I think we're going to need to figure out a reproducing case and fix it ourselves / pass off to @bebraw.

@bondz

This comment has been minimized.

Show comment
Hide comment
@bondz

bondz Feb 6, 2017

Contributor

@Timer true, webpack-contrib/extract-text-webpack-plugin#307 doesn't affect CRA for stated reason, glad.

Think webpack-contrib/extract-text-webpack-plugin#366 might affect us though but the issues don't seem to have test cases the maintainers need for a fix and could take a while for them to be provided.

Guess we can ask @bebraw for a recommendation.

Contributor

bondz commented Feb 6, 2017

@Timer true, webpack-contrib/extract-text-webpack-plugin#307 doesn't affect CRA for stated reason, glad.

Think webpack-contrib/extract-text-webpack-plugin#366 might affect us though but the issues don't seem to have test cases the maintainers need for a fix and could take a while for them to be provided.

Guess we can ask @bebraw for a recommendation.

@bebraw

This comment has been minimized.

Show comment
Hide comment
@bebraw

bebraw Feb 6, 2017

@bondz Yeah, we are a little stuck with a couple of issues. Those prevent from going "final" with the plugin. If the situation keeps like this, I just might have to call it stable even without those two fixes.

bebraw commented Feb 6, 2017

@bondz Yeah, we are a little stuck with a couple of issues. Those prevent from going "final" with the plugin. If the situation keeps like this, I just might have to call it stable even without those two fixes.

@ianschmitz ianschmitz referenced this pull request Feb 9, 2017

Closed

PWA features #1086

Timer added some commits Feb 11, 2017

@Timer

This comment has been minimized.

Show comment
Hide comment
@Timer

Timer Feb 11, 2017

Collaborator

CI passing πŸŽ‰

Collaborator

Timer commented Feb 11, 2017

CI passing πŸŽ‰

@Timer

This comment has been minimized.

Show comment
Hide comment
@Timer

Timer Feb 11, 2017

Collaborator

πŸš€ let's do it!

Collaborator

Timer commented Feb 11, 2017

πŸš€ let's do it!

@Timer Timer merged commit 1228883 into facebook:master Feb 11, 2017

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

@Timer Timer deleted the Timer:webpack-v2 branch Feb 11, 2017

@gaearon

This comment has been minimized.

Show comment
Hide comment
Member

gaearon commented Feb 11, 2017

@Timer Timer changed the title from Upgrade webpack to Upgrade to webpack v2 Feb 11, 2017

bondz added a commit to bondz/create-react-app that referenced this pull request Feb 12, 2017

Upgrade webpack (#1291)
* Upgrade webpack

* Address more webpack v2 ...

* Update html-webpack-plugin

* Remove LoaderOptionsPlugin from dev config

* ExtractTextPlugin still uses webpack 1 syntax
... and doesn't support complex options (yet)

* Grammar nit

* Update extract text webpack plugin

* - Remove webpack.LoaderOptionsPlugin
- Update deps

* Lerna hoists packages

* Update extract-text-webpack-plugin

* Update webpack-dev-server

* Remove imports for the tests

* stop removing babelrc

@sebastianrothe sebastianrothe referenced this pull request in infernojs/create-inferno-app Feb 16, 2017

Closed

Webpack 2.0 #23

@sublimeye

This comment has been minimized.

Show comment
Hide comment
@sublimeye

sublimeye Feb 20, 2017

@Timer Is this change should be already available when installing a new app? I'm still getting webpack@1.14 with a fresh installation.

Created a bug just in case #1599

sublimeye commented Feb 20, 2017

@Timer Is this change should be already available when installing a new app? I'm still getting webpack@1.14 with a fresh installation.

Created a bug just in case #1599

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Feb 20, 2017

Member

Just because something was merged, doesn't mean it was released πŸ˜‰ .

Member

gaearon commented Feb 20, 2017

Just because something was merged, doesn't mean it was released πŸ˜‰ .

@Timer

This comment has been minimized.

Show comment
Hide comment
@Timer

Timer Feb 20, 2017

Collaborator

No @sublimeye, it is only available in master and must be installed manually.

edit: please be aware that using master is strictly for testing purposes and not considered stable, see @gaearon's comment below.

Collaborator

Timer commented Feb 20, 2017

No @sublimeye, it is only available in master and must be installed manually.

edit: please be aware that using master is strictly for testing purposes and not considered stable, see @gaearon's comment below.

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Feb 20, 2017

Member

Just to be clear, I wouldn't recommend installing it manually to anyone. We're still working out the issues, and master is never considered fully stable.

You can see the milestone for each issue and PR:

screen shot 2017-02-20 at 18 03 38

Compare it to the latest release to know if something is released or not.

Member

gaearon commented Feb 20, 2017

Just to be clear, I wouldn't recommend installing it manually to anyone. We're still working out the issues, and master is never considered fully stable.

You can see the milestone for each issue and PR:

screen shot 2017-02-20 at 18 03 38

Compare it to the latest release to know if something is released or not.

danielfigueiredo pushed a commit to danielfigueiredo/create-react-app that referenced this pull request Feb 22, 2017

Upgrade webpack (#1291)
* Upgrade webpack

* Address more webpack v2 ...

* Update html-webpack-plugin

* Remove LoaderOptionsPlugin from dev config

* ExtractTextPlugin still uses webpack 1 syntax
... and doesn't support complex options (yet)

* Grammar nit

* Update extract text webpack plugin

* - Remove webpack.LoaderOptionsPlugin
- Update deps

* Lerna hoists packages

* Update extract-text-webpack-plugin

* Update webpack-dev-server

* Remove imports for the tests

* stop removing babelrc

@axelson axelson referenced this pull request Feb 23, 2017

Closed

Upgrade to webpack v2 #189

"eslint-plugin-flowtype": "2.21.0",
"eslint-plugin-import": "2.0.1",
"eslint-plugin-jsx-a11y": "2.2.3",
"eslint-plugin-react": "6.4.1",
- "extract-text-webpack-plugin": "1.0.1",
+ "extract-text-webpack-plugin": "2.0.0-rc.3",

This comment has been minimized.

@SimenB

SimenB Mar 2, 2017

Contributor
@SimenB

SimenB Mar 2, 2017

Contributor
@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Mar 2, 2017

Member

@shai32

When everything tagged for 0.10 is ready. We don’t delay releases because we want toβ€”we delay them because there are outstanding bugs (in CRA or underlying tools), or because there are features we still want to get in. Maybe you want to help?

Member

gaearon commented Mar 2, 2017

@shai32

When everything tagged for 0.10 is ready. We don’t delay releases because we want toβ€”we delay them because there are outstanding bugs (in CRA or underlying tools), or because there are features we still want to get in. Maybe you want to help?

kst404 pushed a commit to kst404/e8e-react-scripts that referenced this pull request Mar 2, 2017

Upgrade webpack (#1291)
* Upgrade webpack

* Address more webpack v2 ...

* Update html-webpack-plugin

* Remove LoaderOptionsPlugin from dev config

* ExtractTextPlugin still uses webpack 1 syntax
... and doesn't support complex options (yet)

* Grammar nit

* Update extract text webpack plugin

* - Remove webpack.LoaderOptionsPlugin
- Update deps

* Lerna hoists packages

* Update extract-text-webpack-plugin

* Update webpack-dev-server

* Remove imports for the tests

* stop removing babelrc
@shai32

This comment has been minimized.

Show comment
Hide comment
@shai32

shai32 Mar 3, 2017

Sorry for asking for release date, will not do it again.
Thanks for anyone who contribute to this project.

shai32 commented Mar 3, 2017

Sorry for asking for release date, will not do it again.
Thanks for anyone who contribute to this project.

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Mar 3, 2017

Member

No worries, I’m sorry if my message sounded combative 😞 .

I just meant that we don’t really have any specific day in mindβ€”it’ll take some time to fix all the issues, and help is welcome.

Member

gaearon commented Mar 3, 2017

No worries, I’m sorry if my message sounded combative 😞 .

I just meant that we don’t really have any specific day in mindβ€”it’ll take some time to fix all the issues, and help is welcome.

@iddan

This comment has been minimized.

Show comment
Hide comment
@iddan

iddan Mar 12, 2017

For some reason even though I upgraded the package it still installs me webpack 1

iddan commented Mar 12, 2017

For some reason even though I upgraded the package it still installs me webpack 1

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Mar 12, 2017

Member

Have you had a chance to read the comments above asking the very same question?
πŸ˜‰

Member

gaearon commented Mar 12, 2017

Have you had a chance to read the comments above asking the very same question?
πŸ˜‰

@viksit

This comment has been minimized.

Show comment
Hide comment
@viksit

viksit Mar 21, 2017

@gaearon @Timer how do you recommend manually installing CRA from github? I've tried npm install -g git+https://github.com/facebookincubator/create-react-app.git but that results in a

npm ERR! No name provided in package.json

npm ERR! A complete log of this run can be found in: ...

What am I doing wrong?

viksit commented Mar 21, 2017

@gaearon @Timer how do you recommend manually installing CRA from github? I've tried npm install -g git+https://github.com/facebookincubator/create-react-app.git but that results in a

npm ERR! No name provided in package.json

npm ERR! A complete log of this run can be found in: ...

What am I doing wrong?

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Mar 21, 2017

Member

We don't support installing from GitHub (and that won't help you anyway because the CLI is not where the code lives).

Please don't rush to migrate to Webpack 2 because it's cool. We'll release support for it when it's fully ready. Give it some time please.

If you absolutely insist on trying it, there's an unstable, possibly buggy, nightly canary build of react-scripts that includes Webpack 2. I will lock this thread and won't tell you how to find it because if it's posted here, then every beginner will attempt to use it, and their projects will break in unexpected ways. But if you know how to find unstable npm package versions, then feel free to give it a try and report any issues πŸ˜‰ .

Member

gaearon commented Mar 21, 2017

We don't support installing from GitHub (and that won't help you anyway because the CLI is not where the code lives).

Please don't rush to migrate to Webpack 2 because it's cool. We'll release support for it when it's fully ready. Give it some time please.

If you absolutely insist on trying it, there's an unstable, possibly buggy, nightly canary build of react-scripts that includes Webpack 2. I will lock this thread and won't tell you how to find it because if it's posted here, then every beginner will attempt to use it, and their projects will break in unexpected ways. But if you know how to find unstable npm package versions, then feel free to give it a try and report any issues πŸ˜‰ .

@facebook facebook locked and limited conversation to collaborators Mar 21, 2017

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon May 16, 2017

Member

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

Member

gaearon commented May 16, 2017

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.