mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 16:55:37 +02:00
✨ feat: Add markdown support plus /blog (#107)
Adds `/blog` page with support for `.md` and `.mdx` files. What we learnt in setting this up will be packages in a package `@nestri/mdx` and used to set up the `/docs` and the `/terms` and `/privacy` routes
This commit is contained in:
@@ -6,8 +6,9 @@ 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";
|
||||
import pkg from "./package.json";
|
||||
import { qwikReact } from "@builder.io/qwik-react/vite";
|
||||
import pkg from "./package.json";
|
||||
|
||||
type PkgDep = Record<string, string>;
|
||||
const { dependencies = {}, devDependencies = {} } = pkg as any as {
|
||||
dependencies: PkgDep;
|
||||
@@ -19,9 +20,14 @@ errorOnDuplicatesPkgDeps(devDependencies, dependencies);
|
||||
* Note that Vite normally starts from `index.html` but the qwikCity plugin makes start at `src/entry.ssr.tsx` instead.
|
||||
*/
|
||||
|
||||
export default defineConfig(({ command, mode }): UserConfig => {
|
||||
export default defineConfig((): UserConfig => {
|
||||
return {
|
||||
plugins: [qwikCity({ trailingSlash: false }), qwikVite(), tsconfigPaths(), qwikReact()],
|
||||
plugins: [
|
||||
qwikCity({ trailingSlash: false }),
|
||||
qwikVite(),
|
||||
tsconfigPaths(),
|
||||
qwikReact(),
|
||||
],
|
||||
// This tells Vite which dependencies to pre-build in dev mode.
|
||||
optimizeDeps: {
|
||||
// Put problematic deps that break bundling here, mostly those with binaries.
|
||||
|
||||
Reference in New Issue
Block a user