-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9856ec0
commit 4e70f37
Showing
1 changed file
with
13 additions
and
5 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,31 @@ | ||
Nuxt.js incremental build experiment | ||
|
||
Nuxt.js allows partial build with `--no-build` command. | ||
|
||
## How to run | ||
|
||
Do initial build with | ||
Do initial build (`nuxt generate`) with | ||
``` | ||
npm run initial-build | ||
``` | ||
Then move the built files to `mock-cache-dir` | ||
Then move the built directory to `mock-cache-dir` with command below. This will move `dist` and `.nuxt` to `cache-mock` dir, | ||
|
||
``` | ||
npm run mock-cache-dir | ||
``` | ||
|
||
Generate files only for new route with | ||
Now, run the partial build with | ||
|
||
``` | ||
npm run incremental-build | ||
``` | ||
|
||
Merge new build with initial build with | ||
This will move `.nuxt` back to first level dir (Nuxt's partial build skips the build for common assets such as js, css. It references `.nuxt` folder to generate the path), then generate pages for dynamic routes. | ||
|
||
|
||
Merge new(partial) build with initial build | ||
``` | ||
npm run merge | ||
``` | ||
New build will get merged into the initial build in `cache-mock` directory. | ||
|
||
New build will get merged into the initial build in `cache-mock/dist` directory. |