Skip to content

Commit

Permalink
bump to qwik 1.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
vanvuongngo committed Jan 25, 2024
1 parent a34e355 commit 8aaff53
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 16 deletions.
71 changes: 71 additions & 0 deletions templates/qwik-frontend/content/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Qwik City App ⚡️

- [Qwik Docs](https://qwik.builder.io/)
- [Discord](https://qwik.builder.io/chat)
- [Qwik GitHub](https://github.com/BuilderIO/qwik)
- [@QwikDev](https://twitter.com/QwikDev)
- [Vite](https://vitejs.dev/)

---

## Project Structure

This project is using Qwik with [QwikCity](https://qwik.builder.io/qwikcity/overview/). QwikCity is just an extra set of tools on top of Qwik to make it easier to build a full site, including directory-based routing, layouts, and more.

Inside your project, you'll see the following directory structure:

```
├── public/
│ └── ...
└── src/
├── components/
│ └── ...
└── routes/
└── ...
```

- `src/routes`: Provides the directory-based routing, which can include a hierarchy of `layout.tsx` layout files, and an `index.tsx` file as the page. Additionally, `index.ts` files are endpoints. Please see the [routing docs](https://qwik.builder.io/qwikcity/routing/overview/) for more info.

- `src/components`: Recommended directory for components.

- `public`: Any static assets, like images, can be placed in the public directory. Please see the [Vite public directory](https://vitejs.dev/guide/assets.html#the-public-directory) for more info.

## Add Integrations and deployment

Use the `pnpm qwik add` command to add additional integrations. Some examples of integrations includes: Cloudflare, Netlify or Express Server, and the [Static Site Generator (SSG)](https://qwik.builder.io/qwikcity/guides/static-site-generation/).

```shell
pnpm qwik add # or `pnpm qwik add`
```

## Development

Development mode uses [Vite's development server](https://vitejs.dev/). The `dev` command will server-side render (SSR) the output during development.

```shell
npm start # or `pnpm start`
```

> Note: during dev mode, Vite may request a significant number of `.js` files. This does not represent a Qwik production build.
## Preview

The preview command will create a production build of the client modules, a production build of `src/entry.preview.tsx`, and run a local server. The preview server is only for convenience to preview a production build locally and should not be used as a production server.

```shell
pnpm preview # or `pnpm preview`
```

## Production

The production build will generate client and server modules by running both client and server build commands. The build command will use Typescript to run a type check on the source code.

```shell
pnpm build # or `pnpm build`
```

## Static Site Generator (Node.js)

```shell
pnpm build.server
```
27 changes: 14 additions & 13 deletions templates/qwik-frontend/content/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"trustedDependencies": [
"sharp"
],
"type": "module",
"scripts": {
"build": "qwik build",
"build.client": "vite build",
Expand All @@ -26,19 +27,19 @@
"qwik": "qwik"
},
"devDependencies": {
"@builder.io/qwik": "^1.3.1",
"@builder.io/qwik-city": "^1.3.1",
"@types/eslint": "^8.56.0",
"@types/node": "^20.10.5",
"@typescript-eslint/eslint-plugin": "^6.15.0",
"@typescript-eslint/parser": "^6.15.0",
"@builder.io/qwik": "^1.4.1",
"@builder.io/qwik-city": "^1.4.1",
"@types/eslint": "^8.56.2",
"@types/node": "^20.11.6",
"@typescript-eslint/eslint-plugin": "^6.19.1",
"@typescript-eslint/parser": "^6.19.1",
"eslint": "^8.56.0",
"eslint-plugin-qwik": "^1.3.1",
"prettier": "^3.1.1",
"sharp": "^0.33.1",
"typescript": "^5.3.3",
"undici": "^5.28.2",
"vite": "^5.0.10",
"vite-tsconfig-paths": "^4.2.2"
"eslint-plugin-qwik": "^1.4.1",
"prettier": "^3.2.4",
"sharp": "^0.33.2",
"typescript": "5.3.3",
"undici": "^6.4.0",
"vite": "^5.0.12",
"vite-tsconfig-paths": "^4.2.1"
}
}
6 changes: 3 additions & 3 deletions templates/qwik-frontend/content/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { defineConfig } from "vite";
import { defineConfig, type UserConfig } from "vite";
import { qwikVite } from "@builder.io/qwik/optimizer";
import { qwikCity } from "@builder.io/qwik-city/vite";
import tsconfigPaths from "vite-tsconfig-paths";

export default defineConfig(() => {
export default defineConfig((): UserConfig => {
return {
plugins: [qwikCity(), qwikVite(), tsconfigPaths()],
dev: {
server: {
headers: {
"Cache-Control": "public, max-age=0",
},
Expand Down

0 comments on commit 8aaff53

Please sign in to comment.