Commit graph

13 commits

Author SHA1 Message Date
Janicklas Ralph
d3293f7cd6 Dynamic granular chunking (#9090)
* Enable granular chunks config for all chunk types

Adding comment

Bug fix

* Update index.test.js

* Update index.test.js

* Fix test cases. Adding next/link to not trigger a different bug

* Removing obsolete comment
2019-10-29 21:27:41 -04:00
Tim Neutkens
2ba352da39 Move next-server back into next package (#8613)
* Initial move

* Make emitting work

* Update paths

* Remove leftover files

* Add correct externals configuration

* Import correct path

* Update path to work with ts-server test

* Update lib directory

* Compile next-server/lib
2019-09-04 10:00:54 -04:00
JJ Kasper
9c8aaf9d4b Fix build-manifest not removing _app files for modern (#8447) 2019-08-20 15:32:03 -04:00
Joe Haddad
df4f600291
🗜 Optimize client-side routing manifest (#8429)
* Optimize client-side routing manifest

* Turn on granularChunks for tests

* Add row for build manifest

* Hack it
2019-08-20 02:28:09 -04:00
Alex Castle
3e8b36e879 Experimental: Granular build chunking (#7696)
* Refactor SplitChunksPlugin configs and add experimental chunking strategy

* Use typeDefs for SplitChunksConfig

* Modify build manifest plugin to create runtime build manifest

* Add support for granular chunks to page-loader

* Ensure normal behavior if experimental granularChunks flag is false

* Update client build manifest to remove iife & implicit global

* Factor out '/_next/' prepending into getDependencies

* Update packages/next/build/webpack-config.ts filepath regex

Co-Authored-By: Jason Miller <developit@users.noreply.github.com>

* Simplify dependency load ordering in page-loader.js

* Use SHA1 hash to shorten filenames for dependency modules

* Add scheduler to framework cacheGroup in webpack-config

* Update page loader to not duplicate script tags with query parameters

* Ensure no slashes end up in the file hashes

* Add prop-types to framework chunk

* Fix issue with mis-attributed events

* Increase modern build size budget--possibly decrement after consulting with @janicklasralph

* Use module.rawRequest for lib chunks

Co-Authored-By: Daniel Stockman <daniel.stockman@gmail.com>

* Dasherize lib chunk names

Co-Authored-By: Daniel Stockman <daniel.stockman@gmail.com>

* Fix typescript errors, reorganize lib name logic

* Dasherize rawRequest, short circuit name logic when rawRequest found

* Add `scheduler` package to test regex

* Fix a nit

* Adjust build manifest plugin

* Shorten key name

* Extract createPreloadLink helper

* Extract getDependencies helper

* Move method

* Minimize diff

* Minimize diff x2

* Fix Array.from polyfill

* Simplify page loader code

* Remove async=false for script tags

* Code golf `getDependencies` implementation

* Require lib chunks be in node_modules

* Update packages/next/build/webpack-config.ts

Co-Authored-By: Joe Haddad <timer150@gmail.com>

* Replace remaining missed windows compat regex

* Trim client manifest

* Prevent duplicate link preload tags

* Revert size test changes

* Squash manifest size even further

* Add comment for clarity

* Code golfing 🏌️‍♂️

* Correctly select modern dependencies

* Ship separate modern client manifest when module/module enabled

* Update packages/next/build/webpack/plugins/build-manifest-plugin.ts

Co-Authored-By: Joe Haddad <timer150@gmail.com>

* Remove unneccessary filter from page-loader

* Add lookbehind to file extension regex in page-loader

* v9.0.3

* Update examples for Apollo with AppTree (#8180)

* Update examples for Apollo with AppTree

* Fix apolloClient being overwritten when rendering AppTree

* Golf page-loader (#8190)

* Remove lookbehind for module replacement

* Wait for build manifest promise before page load or prefetch

* Updating modern-only chunks inside the right entry point

* Fixing ts errors

* Rename variable

* Revert "Wait for build manifest promise before page load or prefetch"

This reverts commit c370528c6888ba7fa71162a0854534ed280224ef.

* Use proper typedef for webpack chunk

* Re-enable promisified client build manifest

* Fix bug in getDependencies map

* Insert check for granularChunks in page-loader

* Increase size limit temporarily for granular chunks

* Add 50ms delay to flaky test

* Set env.__NEXT_GRANULAR_CHUNKS in webpack config

* Reset size limit to 187

* Set process.env.__NEXT_GRANULAR_CHUNKS to false if selectivePageBuilding

* Update test/integration/production/test/index.test.js

Co-Authored-By: Joe Haddad <timer150@gmail.com>

* Do not create promise if not using chunking PR
2019-08-08 13:14:33 -04:00
Joe Haddad
31b3106a32
Revert "ncc Webpack build redux (#7628)"
This reverts commit e85a517e1a.
2019-06-24 09:48:26 -04:00
Guy Bedford
e85a517e1a ncc Webpack build redux (#7628)
* Reimplement ncc webpack build

This reverts commit 6feca310d7.

* Shared webpack build

* ncc workaround pending @zeit/ncc#437

* update ncc

* build tweaks, fixup autodll-import

* possible Node 8 fix

* second possible Node 8 fix

* and update taskfile
2019-06-21 12:28:41 -04:00
Tim Neutkens
3e51ddb8af
Move syntax formatting to prettier (#7454)
* Run prettier over packages/**/*.js

* Run prettier over packages/**/*.ts

* Run prettier over examples

* Remove tslint

* Run prettier over examples

* Run prettier over all markdown files

* Run prettier over json files
2019-05-29 13:57:26 +02:00
Tim Neutkens
6feca310d7
Revert ncc webpack (#7370)
* Revert "Add retrying to CircleCi and fixes for ncc'ed webpack (#7366)"

This reverts commit 5beb365d12.

* Revert "ncc Webpack build (#7301)"

This reverts commit bd8f3c625f.

# Conflicts:
#	packages/next/package.json
2019-05-17 13:25:46 +02:00
Guy Bedford
bd8f3c625f
ncc Webpack build (#7301)
* add back ncc

* fixup ncc build
2019-05-16 11:55:54 -05:00
JJ Kasper
ceb60b650a
revert nccing webpack (#7189) 2019-04-28 15:35:40 -05:00
Connor Davis
f66546f950
Use ncc to bundle webpack (#6347) 2019-04-26 17:24:30 -05:00
Luis Fernando Alvarez D
254b23eb07
Add declaration files to /dist (#7118) 2019-04-23 16:12:33 -05:00
Renamed from packages/next/build/webpack/plugins/build-manifest-plugin.js (Browse further)