Adds a tutorial project under nx-dev The tutorials are run in browser and can be accessed here: [/tutorials](https://nx-dev-git-nx-dev-tutorialkit-nrwl.vercel.app/tutorials) The tutorials include: - TypeScript Packages - React Monorepo - Angular Monorepo In the future, we will link directly from the sidebar to the in-browser tutorials.
53 lines
1.2 KiB
TypeScript
53 lines
1.2 KiB
TypeScript
import tutorialkit from '@tutorialkit/astro';
|
|
import { defineConfig, envField } from 'astro/config';
|
|
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
|
|
export const config = defineConfig({
|
|
base: '/tutorials',
|
|
devToolbar: {
|
|
enabled: false,
|
|
},
|
|
experimental: {
|
|
env: {
|
|
schema: {
|
|
NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA: envField.string({
|
|
context: 'client',
|
|
access: 'public',
|
|
optional: true,
|
|
}),
|
|
NEXT_PUBLIC_FARO_URL: envField.string({
|
|
context: 'client',
|
|
access: 'public',
|
|
optional: true,
|
|
}),
|
|
NEXT_PUBLIC_VERCEL_ENV: envField.string({
|
|
context: 'client',
|
|
access: 'public',
|
|
optional: true,
|
|
}),
|
|
},
|
|
},
|
|
},
|
|
vite: {
|
|
plugins: [nxViteTsPaths() as any],
|
|
ssr: {
|
|
noExternal: [
|
|
'@tutorialkit/astro',
|
|
'@astrojs/mdx',
|
|
'@astrojs/react',
|
|
'astro-expressive-code',
|
|
],
|
|
},
|
|
},
|
|
integrations: [
|
|
tutorialkit({
|
|
components: {
|
|
HeadTags: './src/components/HeadTags.astro',
|
|
TopBar: './src/components/TopBar.astro',
|
|
},
|
|
}),
|
|
],
|
|
});
|
|
|
|
export default config;
|