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

Feature/webpack3 #2574

Merged
merged 20 commits into from Jul 25, 2017
Merged

Feature/webpack3 #2574

merged 20 commits into from Jul 25, 2017

Conversation

themre
Copy link
Contributor

@themre themre commented Jun 20, 2017

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

@themre
Copy link
Contributor Author

themre commented Jun 20, 2017

@shrynx
Copy link
Contributor

shrynx commented Jun 20, 2017

@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
Copy link
Contributor Author

themre commented Jun 20, 2017

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

@Timer
Copy link
Contributor

Timer commented Jun 22, 2017

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
Copy link
Contributor Author

themre commented Jun 22, 2017

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

@themre
Copy link
Contributor Author

themre commented Jun 22, 2017

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
Copy link
Contributor

Timer commented Jun 22, 2017

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
Copy link
Contributor

Timer commented Jun 22, 2017

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
Copy link
Contributor Author

themre commented Jun 22, 2017

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

@Timer
Copy link
Contributor

Timer commented Jun 22, 2017

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
Copy link
Contributor Author

themre commented Jun 22, 2017

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
Copy link
Contributor Author

themre commented Jun 22, 2017

@shrynx already mentioned it :) thanks!

Copy link
Contributor

@gaearon gaearon left a comment

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.

@@ -254,6 +254,7 @@ module.exports = {
// 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
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.

@@ -293,6 +293,7 @@ module.exports = {
},
sourceMap: true,
}),
new webpack.optimize.ModuleConcatenationPlugin(),
Copy link
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
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
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
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
Copy link
Contributor Author

themre commented Jul 8, 2017

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

@themre
Copy link
Contributor Author

themre commented Jul 8, 2017

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

@themre
Copy link
Contributor Author

themre commented Jul 21, 2017

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

@themre
Copy link
Contributor Author

themre commented Jul 22, 2017

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
Copy link
Contributor

gaearon commented Jul 22, 2017

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

@gaearon
Copy link
Contributor

gaearon commented Jul 22, 2017

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

@themre
Copy link
Contributor Author

themre commented Jul 22, 2017

great, thanks!

@joshwiens
Copy link
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
Copy link
Contributor Author

themre commented Jul 24, 2017

seems everything is ok now.

@gaearon gaearon added this to the 1.0.11 milestone Jul 25, 2017
@gaearon gaearon merged commit bc82755 into facebook:master Jul 25, 2017
@gaearon
Copy link
Contributor

gaearon commented Jul 25, 2017

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
Copy link
Contributor Author

themre commented Jul 25, 2017

#2850

@Timer
Copy link
Contributor

Timer commented Aug 9, 2017

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.

None yet

7 participants