Skip to content

Commit

Permalink
feat(vite-plugin-nitro): upgrade Nitro dependency to 2.x (#431)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonroberts authored May 24, 2023
1 parent 52c46e9 commit 6c3f387
Show file tree
Hide file tree
Showing 7 changed files with 513 additions and 422 deletions.
10 changes: 8 additions & 2 deletions apps/blog-app/src/app/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { ApplicationConfig } from '@angular/core';
import { provideClientHydration } from '@angular/platform-browser';
import { provideHttpClient } from '@angular/common/http';
import { withInMemoryScrolling } from '@angular/router';
import {
withEnabledBlockingInitialNavigation,
withInMemoryScrolling,
} from '@angular/router';
import { provideFileRouter } from '@analogjs/router';
import { provideContent, withMarkdownRenderer } from '@analogjs/content';

Expand All @@ -10,6 +13,9 @@ export const appConfig: ApplicationConfig = {
provideHttpClient(),
provideClientHydration(),
provideContent(withMarkdownRenderer()),
provideFileRouter(withInMemoryScrolling({ anchorScrolling: 'enabled' })),
provideFileRouter(
withInMemoryScrolling({ anchorScrolling: 'enabled' }),
withEnabledBlockingInitialNavigation()
),
],
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"lint-staged": "^13.1.0",
"minimist": "^1.2.7",
"ng-packagr": "^16.0.0",
"nitropack": "^1.0.0",
"nitropack": "^2.0.0",
"nx": "16.1.0",
"playwright": "^1.30.0",
"postcss": "^8.4.21",
Expand Down
2 changes: 1 addition & 1 deletion packages/platform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"url": "https://github.com/analogjs/analog.git"
},
"dependencies": {
"nitropack": "^1.0.0",
"nitropack": "^2.0.0",
"@analogjs/vite-plugin-angular": "^0.2.0-beta.13",
"@analogjs/vite-plugin-nitro": "^0.2.0-beta.13",
"@nx/devkit": "^16.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/vite-plugin-nitro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"url": "https://github.com/analogjs/analog.git"
},
"dependencies": {
"nitropack": "^1.0.0"
"nitropack": "^2.0.0"
},
"ng-update": {
"packageGroup": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const mockNitroConfig: NitroConfig = {
rootDir: '.',
runtimeConfig: {},
scanDirs: ['src/server'],
srcDir: 'src',
srcDir: 'src/server',
prerender: {
crawlLinks: undefined,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/vite-plugin-nitro/src/lib/vite-plugin-nitro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function nitro(options?: Options, nitroOptions?: NitroConfig): Plugin {
nitroConfig = {
rootDir,
logLevel: nitroOptions?.logLevel || 0,
srcDir: normalizePath(`${rootDir}/src`),
srcDir: normalizePath(`${rootDir}/src/server`),
scanDirs: [normalizePath(`${rootDir}/src/server`)],
output: {
dir: normalizePath(
Expand Down
915 changes: 500 additions & 415 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit 6c3f387

Please sign in to comment.