Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdehaven committed Jun 29, 2023
1 parent a1cedae commit 223b8bd
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ A **Style Dictionary** is a build system that allows you to define styles once,
- [Token Requirements](#token-requirements)
- [Updating Tokens \& Local Development](#updating-tokens--local-development)
- [VS Code extensions](#vs-code-extensions)
- [Server-Side Rendering (SSR)](#server-side-rendering-ssr)
- [Development Sandbox](#development-sandbox)
- [Lint and fix](#lint-and-fix)
- [Build for production](#build-for-production)
Expand Down Expand Up @@ -109,6 +110,25 @@ yarn install --frozen-lockfile
}
```

### Server-Side Rendering (SSR)

If your host app utilizes SSR, you may need to resolve aliases to the package exports.

For example, for a VitePress site, add the following to your `vite.config.ts`

```ts
export default defineConfig({
resolve: {
alias: {
// We must alias `@kong/design-tokens` imports to specifically utilize the esm build
'@kong/design-tokens/tokens/scss/variables': path.resolve(__dirname, '../node_modules/@kong/design-tokens/dist/tokens/scss/variables.scss'),
'@kong/design-tokens': path.resolve(__dirname, '../node_modules/@kong/design-tokens/dist/tokens/js/'),
},
},
})

```

### Development Sandbox

This repository includes a Vue sandbox (see the `/sandbox` directory) to allow you to experiment with consuming tokens.
Expand Down

0 comments on commit 223b8bd

Please sign in to comment.