Skip to content

Commit dbd0eb6

Browse files
moving to the static adapter
1 parent f80aa5c commit dbd0eb6

File tree

4 files changed

+30
-27
lines changed

4 files changed

+30
-27
lines changed

apps/website/README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ Inside your project, you'll see the following directory structure:
3535
Use the `pnpm qwik add` command to add additional integrations. Some examples of integrations include: Cloudflare, Netlify or Express server, and the [Static Site Generator (SSG)](https://qwik.builder.io/qwikcity/static-site-generation/static-site-config/).
3636

3737
```shell
38-
pnpm qwik add # or `yarn qwik add`
38+
pnpm qwik add # or `pnpm qwik add`
3939
```
4040

4141
## Development
4242

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

4545
```shell
46-
npm start # or `yarn start`
46+
npm start # or `pnpm start`
4747
```
4848

4949
> Note: during dev mode, Vite may request a significant number of `.js` files. This does not represent a Qwik production build.
@@ -53,13 +53,19 @@ npm start # or `yarn start`
5353
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 locally preview a production build, and it should not be used as a production server.
5454

5555
```shell
56-
pnpm preview # or `yarn preview`
56+
pnpm preview # or `pnpm preview`
5757
```
5858

5959
## Production
6060

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

6363
```shell
64-
pnpm build # or `yarn build`
64+
pnpm build # or `pnpm build`
65+
```
66+
67+
## Static Site Generator (Node.js)
68+
69+
```shell
70+
pnpm build.server
6571
```

apps/website/adapters/cloudflare-pages/vite.config.ts

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { staticAdapter } from '@builder.io/qwik-city/adapters/static/vite';
2+
import { extendConfig } from '@builder.io/qwik-city/vite';
3+
import baseConfig from '../../vite.config';
4+
5+
export default extendConfig(baseConfig, () => {
6+
return {
7+
build: {
8+
ssr: true,
9+
rollupOptions: {
10+
input: ['@qwik-city-plan'],
11+
},
12+
},
13+
plugins: [
14+
staticAdapter({
15+
origin: 'https://qwikui.com',
16+
}),
17+
],
18+
};
19+
});

apps/website/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"mode": "production"
4848
},
4949
"production": {
50-
"configFile": "apps/website/adapters/cloudflare-pages/vite.config.ts"
50+
"configFile": "apps/website/adapters/static/vite.config.ts"
5151
}
5252
},
5353
"dependsOn": []

0 commit comments

Comments
 (0)