-
Notifications
You must be signed in to change notification settings - Fork 27.7k
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
Universal Webpack #3578
Merged
Merged
Universal Webpack #3578
Changes from 101 commits
Commits
Show all changes
138 commits
Select commit
Hold shift + click to select a range
fcb3430
Speed up next build
timneutkens c1ebbf6
Document webpack config
timneutkens 83916b7
Speed up next build
timneutkens 443ece9
Remove comment
timneutkens 0aacb17
Add comment
timneutkens ad6cc8a
Merge branch 'fix/webpack-build-speed-increase' into feature/universa…
timneutkens 6ce025e
Clean up rules
timneutkens c3914ea
Add comments
timneutkens b1aac7b
Run in parallel
timneutkens 7bee9a7
Push plugins seperately
timneutkens 5373354
Create a new chunk for react
timneutkens dc3f242
Don’t uglify react since it’s already uglified. Move react to commons…
timneutkens 6fabf34
Use the minified version directly
timneutkens 654c48e
Re-add globpattern
timneutkens 3192950
Merge branch 'canary' of github.com:zeit/next.js into fix/add-comment…
timneutkens 25e8bca
Move loaders into a separate variable
timneutkens 82e5505
Add comment linking to Dan’s explanation
timneutkens c8ff14b
Remove dot
timneutkens b4fbe50
Add universal webpack
timneutkens a057415
Initial dev support
timneutkens 8226bd9
Fix linting
timneutkens 91569e0
Merge branch 'canary' of github.com:zeit/next.js into feature/webpack
timneutkens e5d2078
Add changes from Arunoda's work
timneutkens b843e6e
Made next dev works.
arunoda 9da6404
Fix client side hot reload
timneutkens 5cb819a
Server side hmr
timneutkens b97bc2f
Only in dev
timneutkens 89f9793
Add on-demand-entries client + hot-middleware
timneutkens aec6aa1
Add .babelrc support
timneutkens 888bc35
Speed up on demand entries by running in parallel
timneutkens ab26369
Serve static generated files
timneutkens 8859c5f
Add missing config in dev
timneutkens 84d785a
Add sass support
timneutkens c5ccf23
Add support for .map
timneutkens bb5cf9a
Add cssloader config and fix .jsx support
timneutkens 565bf54
Rename
timneutkens 122fc92
use same defaults as css-loader. Fix linting
timneutkens c487416
Add NoEmitErrorsPlugin
timneutkens c6c7e15
Add clientBootstrap
timneutkens 008e659
Use webpackhotmiddleware on the multi compiler
timneutkens fa4b18f
alpha.3
timneutkens 2057482
Use babel 16.2.x
timneutkens 7bd3178
Fix reloading after error
timneutkens c136af8
Remove comment
timneutkens bf78292
Release 5.0.0-univeral-alpha.1
timneutkens 5e5b9e8
Remove check for React 16
timneutkens 7b339a4
Release 5.0.0-universal-alpha.2
timneutkens 6494359
React hot loader v4
timneutkens f8f1fba
Use our static file rendering machanism to serve pages.
arunoda 820d3c3
Release 5.0.0-universal-alpha.3
timneutkens 48e4d63
Remove optional loaders
timneutkens 190b930
Release 5.0.0-universal-alpha.4
timneutkens 573d4a6
Remove clientBootstrap
timneutkens e0d2a41
Remove renderScript
timneutkens 7d83ae4
Make sure pages bundles are served correctly
timneutkens 9eac841
Remove unused import
timneutkens ea67454
Revert to using the same code as canary
timneutkens 340b93d
Fix hot loader
timneutkens 52605da
Release 5.0.0-universal-alpha.5
timneutkens 3347940
Check if externals dir exist before applying config
timneutkens 5434104
Add typescript support
timneutkens d4b1d9b
Add support for transpiling certain packages in node_modules
timneutkens 4ca1a44
Add BABEL_DISABLE_CACHE support
timneutkens 5821d49
Make sourcemaps in production opt-in
timneutkens 91ad193
Revert "Add support for transpiling certain packages in node_modules"
timneutkens dbbdec4
Support typescript through next.config.js
timneutkens 5fd08f1
Remove comments
timneutkens fcea07c
Bring back commons.js calculation
timneutkens 04651be
Remove unused dependencies
timneutkens 1f023a8
Move base.config.js to webpack.js
timneutkens 435b60d
Make sure to only invalidate webpackDevMiddleware one after other.
arunoda 1a2ab91
Allow babel-loder caching by default.
arunoda 495e0a4
Add comment about preact support
timneutkens 2a3aa74
Bring back buildir replace
timneutkens 8e96607
Remove obsolete plugin
timneutkens 6473226
Remove build replace, speed up build
timneutkens 30af0bf
Resolve page entries like pages/day/index.js to pages/day.js
timneutkens d82c566
Add componentDidCatch back
timneutkens 94fdee5
Compile to bundles
timneutkens bd27a7e
Use config.distDir everywhere
timneutkens deff65a
Make sure the file is an array
timneutkens ef06a04
Remove console.log
timneutkens de8d0fb
Apply optimization to uglifyjs
timneutkens c80228b
Add comment pointing to source
timneutkens 49e2808
Create entries the same way in dev and production
timneutkens 7106aff
Remove unused and broken pagesGlobPattern
timneutkens a10c21e
day/index.js is automatically turned into day.js at build time
timneutkens fb7c862
Remove poweredByHeader option
timneutkens d948ef5
Load pages with the correct path.
arunoda 763a1d2
Release 5.0.0-universal-alpha.6
timneutkens 9b709c5
Make sure react-dom/server can be overwritten by module-alias
timneutkens 6b62551
Only add react-hot-loader babel plugin in dev
timneutkens 4617987
Release 5.0.0-universal-alpha.7
timneutkens 6833e8b
Revert tests
timneutkens 516fa62
Release 5.0.0-universal-alpha.10
timneutkens 97f45e9
Make sure next/head is working properly.
arunoda e57c236
Add wepack alias for 'next' back.
arunoda 7ed60b7
Make sure overriding className in next/head works
timneutkens 4911d0a
Alias react too
timneutkens f820315
Merge branch 'feature/webpack' of github.com:zeit/next.js into featur…
timneutkens 8e9f8c7
Add missing r
timneutkens 7e9fa41
Fragment fallback has to wrap the children
timneutkens 1e6e829
Use min.js
timneutkens 3897e64
Remove css.js
timneutkens 9f4de5b
Remove wallaby.js
timneutkens 0aa6aac
Release 5.0.0-universal-alpha.11
timneutkens 65c0747
Merge branch 'canary' of github.com:zeit/next.js into feature/webpack
timneutkens a13f3e4
Resolve relative to workdir instead of next
timneutkens 15d2280
Make sure we touch the right file
timneutkens 280b9c7
Resolve next modules
timneutkens 3479800
Remove dotjsx removal plugins since we use webpack on the server
timneutkens 49b119b
Revert "Resolve relative to workdir instead of next"
timneutkens 5650e50
Externalize any locally loaded module lives outside of app dir.
timneutkens e7a938c
Remove server aliases
timneutkens 827c813
Check node_modules reliably
timneutkens aeea881
Add symlink to next for tests
timneutkens f9e9712
Make sure dynamic imports work locally.
arunoda 6845af9
dynmaic -> dynamic
timneutkens 89f5563
Remove webpack-node-externals
timneutkens c8f9c70
Make sure dynamic imports support SSR.
arunoda 53c9a6b
Remove css support in favor of next-css
timneutkens d6dee1e
Make sure we load path from `/` since it’s included in the path matching
timneutkens ef5f3de
Catch when ensurepage couldn’t be fulfilled for `.js.map`
timneutkens 96b99ac
Register require cache flusher for both client and server
timneutkens 440b39f
Add comment explaining this is to facilitate hot reloading
timneutkens c73853c
Only load module when needed
timneutkens 3269104
Remove unused modules
timneutkens e38c605
Release 5.0.0-universal-alpha.12
timneutkens 01c84a1
Only log the `found babel` message once
timneutkens 91ce3f9
Make sure ondemand entries working correctly.
arunoda a62b764
Better sourcemaps
timneutkens 415de61
Release 5.0.0-universal-alpha.13
timneutkens 3de72fc
Lock uglify version to 1.1.6
timneutkens 256ad20
Release 5.0.0-universal-alpha.14
timneutkens 563c9c3
Fix a typo.
arunoda 3b0d1f8
Introduce multi-zones support for mircofrontends
arunoda 3018694
Add section on css
timneutkens 1226b3d
Merge branch 'feature/webpack' of github.com:zeit/next.js into featur…
timneutkens File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# The poweredByHeader has been removed | ||
|
||
#### Why This Error Occurred | ||
|
||
Starting at Next.js version 5.0.0 the `poweredByHeader` option has been removed. | ||
|
||
#### Possible Ways to Fix It | ||
|
||
If you still want to remove `x-powered-by` you can use one of the custom-server examples. | ||
|
||
And then manually remove the header using `res.removeHeader('x-powered-by')` | ||
|
||
### Useful Links | ||
|
||
- [Custom Server documentation + examples](https://github.com/zeit/next.js#custom-server-and-routing) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to check this? This came with
16.0.0
right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arunoda to support
preact
and the likes that haven't addedhydrate
yet 🕵️There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ha. Shall we add a comment here about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, good idea 👍