Skip to content

Feature/webpack3#2574

Merged
gaearon merged 20 commits into
react:masterfrom
themre:feature/webpack3
Jul 25, 2017
Merged

Feature/webpack3#2574
gaearon merged 20 commits into
react:masterfrom
themre:feature/webpack3

Conversation

@themre

@themre themre commented Jun 20, 2017

Copy link
Copy Markdown
Contributor

Since Webpack 3 is officially released, I created PR with WP3 bump.

@themre

themre commented Jun 20, 2017

Copy link
Copy Markdown
Contributor Author

@shrynx

shrynx commented Jun 20, 2017

Copy link
Copy Markdown
Contributor

@themre Webpack 3's biggest feature being scopes, using ModuleConcatenationPlugin should be used. Also extract-text-plugin is noy yet compatible with webpack 3 webpack-contrib/extract-text-webpack-plugin#494

@themre

themre commented Jun 20, 2017

Copy link
Copy Markdown
Contributor Author

yeah, I know, I just wanted to add feature by feature and see where it fails. and obviously it fails only by bumping :)

@Timer

Timer commented Jun 22, 2017

Copy link
Copy Markdown
Contributor

No need to worry about AppVeyor for now, it's pretty flaky because many tools don't support Windows as well as their macOS/nix counterparts.

Just try to get Travis passing. 😄

Thanks a lot for looking into this.

@themre

themre commented Jun 22, 2017

Copy link
Copy Markdown
Contributor Author

thanks for the info! added ModuleConcatenationPlugin for when later. also noticed this:
webpack/webpack#5089

@themre

themre commented Jun 22, 2017

Copy link
Copy Markdown
Contributor Author

I don't think it's appveyor now. noticed this also when running locally: Module not found: Can't resolve 'source-map-loader' in 'C:\projects\create-react-app-a3khu'. Do we need to add source-map-loader into dependencies?

@Timer

Timer commented Jun 22, 2017

Copy link
Copy Markdown
Contributor

Yeah, be advised that the ModuleConcatenationPlugin is still highly experimental.

We'll need to keep a close eye on webpack issues and run tests on large projects to find any edge cases. It may be too buggy to ship immediately.

@Timer

Timer commented Jun 22, 2017

Copy link
Copy Markdown
Contributor

Is there any reason you included the source-map-loader commit?
I'd say it's safe to remove that commit for now. I'd like for this PR to focus on webpack 3 and leave #2355 to focus on source-map-loader.

@themre

themre commented Jun 22, 2017

Copy link
Copy Markdown
Contributor Author

strange, it merged that commit, but not package.json (which is missing import of source-map-loader). removed it for now.

@Timer

Timer commented Jun 22, 2017

Copy link
Copy Markdown
Contributor

Great! Thanks.

I see a warning:

Creating an optimized production build...
(node:4259) DeprecationWarning: Chunk.modules is deprecated. Use Chunk.getNumberOfModules/mapModules/forEachModule/containsModule instead.
Compiled successfully.

Would you mind taking a peek into this and identifying the offending module?

We need to compile a list of plugins that were broken and need updating by webpack 3.

Additionally, we need to compile a list of breaking changes in webpack@3 that may affect us.

@themre

themre commented Jun 22, 2017

Copy link
Copy Markdown
Contributor Author

extract-text-webpack-plugin.
webpack-contrib/extract-text-webpack-plugin#494
PR is here: webpack-contrib/extract-text-webpack-plugin#543
let's wait for it and then bump it.

@themre

themre commented Jun 22, 2017

Copy link
Copy Markdown
Contributor Author

@shrynx already mentioned it :) thanks!

@gaearon gaearon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for working on it! Left a few comments.

// Makes some environment variables available to the JS code, for example:
// if (process.env.NODE_ENV === 'development') { ... }. See `./env.js`.
new webpack.DefinePlugin(env.stringified),
new webpack.optimize.ModuleConcatenationPlugin(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We shouldn't include this yet. It is too experimental.

},
sourceMap: true,
}),
new webpack.optimize.ModuleConcatenationPlugin(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same

"url-loader": "0.5.8",
"webpack": "2.6.1",
"webpack-dev-server": "2.4.5",
"react-dev-utils": "^3.0.2",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is our own module. Please don't bump it now. It is bumped during the release.

"webpack": "2.6.1",
"webpack-dev-server": "2.4.5",
"react-dev-utils": "^3.0.2",
"react-error-overlay": "^1.0.9",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same.

@@ -48,13 +48,13 @@
"postcss-flexbugs-fixes": "3.0.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't we need to bump ExtractTextPlugin?

@themre

themre commented Jul 8, 2017

Copy link
Copy Markdown
Contributor Author

ok, I removed ModuleConcatenationPlugin, downgraded react packages and bumped ETWP.

@themre

themre commented Jul 8, 2017

Copy link
Copy Markdown
Contributor Author

ETWP rc1 has been released. I updated it only to see if everything goes through so we can report if something else fails.

@themre

themre commented Jul 21, 2017

Copy link
Copy Markdown
Contributor Author

It fails with 3.3.0. Will see if it fails with 3.2.0.

@themre

themre commented Jul 22, 2017

Copy link
Copy Markdown
Contributor Author

hm... it's failing, because:

./src/features/webpack/assets/abstract.json
(Emitted value instead of an instance of Error) ⚠️  JSON Loader
It seems you're using webpack >= v2.0.0, which includes native support for JSON.
Please remove this loader from webpack.config.js as it isn't needed anymore and
is deprecated. See the v1.0.0 -> v2.0.0 migration guide for more information
(https://webpack.js.org/guides/migrating/#json-loader-is-not-required-anymore)
C:/Users/appveyor/AppData/Local/Temp/1/tmp.bNXBiS0bLw/node_modules/test-integrity/package.json
(Emitted value instead of an instance of Error) ⚠️  JSON Loader

It seems initDOM.js (https://github.com/facebookincubator/create-react-app/blob/a171d930641f513279b1c7ceaab1fa9bbbbbb896/packages/react-scripts/fixtures/kitchensink/integration/initDOM.js) tries to load json-loader which isn't required anymore. How do we approach this?

@gaearon

gaearon commented Jul 22, 2017

Copy link
Copy Markdown
Contributor

Hmm I'm not sure where this is coming from 😞
Could this somehow be caused by this?

@gaearon

gaearon commented Jul 22, 2017

Copy link
Copy Markdown
Contributor

I filed an issue in webpack-contrib/json-loader#57.

@themre

themre commented Jul 22, 2017

Copy link
Copy Markdown
Contributor Author

great, thanks!

@joshwiens

Copy link
Copy Markdown
Contributor

@themre - I stripped the deprecation warning in json-loader@0.5.7 which is now available on npm.

To the issue in CompatibilityPlugin.js i'll take that issue up on slack shortly.

In the mean time, i am locking json-loader until we resolve the issue upstream. It was deprecated, should be deprecated by can't be until Webpack doesn't directly depend on it.

@themre

themre commented Jul 24, 2017

Copy link
Copy Markdown
Contributor Author

seems everything is ok now.

@gaearon gaearon added this to the 1.0.11 milestone Jul 25, 2017
@gaearon
gaearon merged commit bc82755 into react:master Jul 25, 2017
@gaearon

gaearon commented Jul 25, 2017

Copy link
Copy Markdown
Contributor

Sweet. Wanna send another PR to bump to webpack 3.4 that just came out?

@themre
themre deleted the feature/webpack3 branch July 25, 2017 19:45
@themre

themre commented Jul 25, 2017

Copy link
Copy Markdown
Contributor Author

#2850

@Timer

Timer commented Aug 9, 2017

Copy link
Copy Markdown
Contributor

Hi there! This change is out in react-scripts@1.0.11; please give it a go! Thanks.

JohnNilsson referenced this pull request in JohnNilsson/create-react-app-typescript Aug 9, 2017
* Add source-map-loader to support source maps of dependencies

* merge with latest develop

* add ModuleConcatenationPlugin

* revert source-map-loader

* bump to 3.1 and update dev-server

* rebase to master

* rebase again

* bump webpack

* remove ModuleConcatenationPlugin, downgraded react packages, bump etwp

* ETWP rc1 only for testing

* bump ETWP and webpack 3

* bump WP3

* revert to 3.2.0

* bump sw-precache-webpack-plugin

* bump back to 3.3.0

* bump dev-server and manifest
JohnNilsson referenced this pull request in JohnNilsson/create-react-app-typescript Sep 9, 2017
* Add source-map-loader to support source maps of dependencies

* merge with latest develop

* add ModuleConcatenationPlugin

* revert source-map-loader

* bump to 3.1 and update dev-server

* rebase to master

* rebase again

* bump webpack

* remove ModuleConcatenationPlugin, downgraded react packages, bump etwp

* ETWP rc1 only for testing

* bump ETWP and webpack 3

* bump WP3

* revert to 3.2.0

* bump sw-precache-webpack-plugin

* bump back to 3.3.0

* bump dev-server and manifest
kasperpeulen pushed a commit to kasperpeulen/create-react-app that referenced this pull request Sep 24, 2017
* Add source-map-loader to support source maps of dependencies

* merge with latest develop

* add ModuleConcatenationPlugin

* revert source-map-loader

* bump to 3.1 and update dev-server

* rebase to master

* rebase again

* bump webpack

* remove ModuleConcatenationPlugin, downgraded react packages, bump etwp

* ETWP rc1 only for testing

* bump ETWP and webpack 3

* bump WP3

* revert to 3.2.0

* bump sw-precache-webpack-plugin

* bump back to 3.3.0

* bump dev-server and manifest
swengorschewski referenced this pull request in swengorschewski/cra-typescript-electron Oct 16, 2017
* Add source-map-loader to support source maps of dependencies

* merge with latest develop

* add ModuleConcatenationPlugin

* revert source-map-loader

* bump to 3.1 and update dev-server

* rebase to master

* rebase again

* bump webpack

* remove ModuleConcatenationPlugin, downgraded react packages, bump etwp

* ETWP rc1 only for testing

* bump ETWP and webpack 3

* bump WP3

* revert to 3.2.0

* bump sw-precache-webpack-plugin

* bump back to 3.3.0

* bump dev-server and manifest
@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.

7 participants