-
-
Notifications
You must be signed in to change notification settings - Fork 353
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
Showing
2 changed files
with
18 additions
and
9 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,12 +1,11 @@ | ||
// TODO/v1-release: remove this file | ||
|
||
import { prerender as prerenderOriginal } from '../prerender/index.js' | ||
export { runPrerenderFromAPI as prerender } from '../prerender/runPrerender.js' | ||
|
||
import { assertWarning } from '../../utils/assert.js' | ||
export const prerender: typeof prerenderOriginal = (options) => { | ||
assertWarning( | ||
false, | ||
"`import { prerender } from 'vike/cli'` is deprecated in favor of `import { prerender } from 'vike/prerender'``", | ||
{ onlyOnce: true, showStackTrace: true } | ||
) | ||
return prerenderOriginal(options) | ||
} | ||
import pc from '@brillout/picocolors' | ||
assertWarning( | ||
false, | ||
`${pc.cyan("import { prerender } from 'vike/cli'")} is deprecated in favor of ${pc.cyan("import { prerender } from 'vike/api'")}`, | ||
{ onlyOnce: true } | ||
) |
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 +1,11 @@ | ||
// TODO/v1-release: remove this file | ||
|
||
export { runPrerenderFromAPI as prerender } from './runPrerender.js' | ||
|
||
import { assertWarning } from './utils.js' | ||
import pc from '@brillout/picocolors' | ||
assertWarning( | ||
false, | ||
`${pc.cyan("import { prerender } from 'vike/prerender'")} is deprecated in favor of ${pc.cyan("import { prerender } from 'vike/api'")}`, | ||
{ onlyOnce: true } | ||
) |