Start renaming
This commit is contained in:
@@ -50,7 +50,7 @@ Fresh configuration to the [fresh vite plugin](/docs/advanced/vite).
|
||||
|
||||
```ts vite.config.ts
|
||||
import { defineConfig } from "vite";
|
||||
import { fresh } from "@fresh/plugin-vite";
|
||||
import { fresh } from "@paulaboks/sweet-vite";
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
|
||||
export default defineConfig({
|
||||
@@ -86,7 +86,7 @@ Similarly, configuration related to running Fresh in production can be passed to
|
||||
`new App()`:
|
||||
|
||||
```ts main.ts
|
||||
import { App, staticFiles } from "fresh";
|
||||
import { App, staticFiles } from "sweet";
|
||||
|
||||
export const app = new App()
|
||||
// Add static file serving middleware
|
||||
@@ -158,11 +158,11 @@ accordingly.
|
||||
|
||||
## Update imports
|
||||
|
||||
Add `jsr:@fresh/plugin-vite` and `npm:vite` to `imports` in your `deno.json`
|
||||
Add `jsr:@paulaboks/sweet-vite` and `npm:vite` to `imports` in your `deno.json`
|
||||
file, either manually or with this command:
|
||||
|
||||
```shell
|
||||
deno install npm:vite jsr:@fresh/plugin-vite
|
||||
deno install npm:vite jsr:@paulaboks/sweet-vite
|
||||
```
|
||||
|
||||
This should be enough in most cases. If you still encounter problems, you may
|
||||
@@ -188,8 +188,8 @@ you can add if needed. This middleware can be used to ensure that URLs always
|
||||
have a trailing slash at the end or that they will never have one.
|
||||
|
||||
```diff main.ts
|
||||
- import { App, staticFiles } from "fresh";
|
||||
+ import { App, staticFiles, trailingSlashes } from "fresh";
|
||||
- import { App, staticFiles } from "sweet";
|
||||
+ import { App, staticFiles, trailingSlashes } from "sweet";
|
||||
|
||||
export const app = new App({ root: import.meta.url })
|
||||
.use(staticFiles())
|
||||
@@ -314,7 +314,8 @@ to [update the command](/docs/deployment/deno-compile) to generate the binary.
|
||||
If you run into problems with upgrading your app, first, try starting a new
|
||||
Fresh 2 project and looking at the new structure.
|
||||
|
||||
eg. `mkdir fresh2-demo && cd fresh2-demo && deno run -Ar jsr:@fresh/init`
|
||||
eg.
|
||||
`mkdir fresh2-demo && cd fresh2-demo && deno run -Ar jsr:@paulaboks/sweet-init`
|
||||
|
||||
### 2. Document
|
||||
|
||||
|
||||
Reference in New Issue
Block a user