Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions vue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ Types live under the `@nside/wefa/types` export:
import type { WefaButtonProps } from '@nside/wefa/types';
```

The published package also includes the Backend-for-Frontend OpenAPI document at `@nside/wefa/bff-openapi`.

### Theme preset

To apply the NSIDE Prime theme preset in your app:
Expand Down
1 change: 1 addition & 0 deletions vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"import": "./dist/network.js",
"require": "./dist/network.cjs"
},
"./bff-openapi": "./dist/bff/openapi.yaml",
"./types": "./dist/lib.d.ts",
"./style": "./src/assets/main.css"
},
Expand Down
16 changes: 16 additions & 0 deletions vue/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
import { fileURLToPath, URL } from 'node:url'
import { copyFileSync, existsSync, mkdirSync } from 'node:fs'
import { defineConfig } from 'vite'
import { resolve } from "path"
import vue from '@vitejs/plugin-vue'
import tailwindcss from '@tailwindcss/vite'
import dts from 'vite-plugin-dts'
import tidewave from 'tidewave/vite-plugin'

const bffOpenApiSource = resolve(__dirname, '../bff/bff_app/openapi/openapi.yaml')
const bffOpenApiDistDir = resolve(__dirname, 'dist/bff')
const bffOpenApiDistFile = resolve(bffOpenApiDistDir, 'openapi.yaml')

// https://vite.dev/config/
export default defineConfig({
plugins: [
{
name: 'copy-bff-openapi',
writeBundle() {
if (!existsSync(bffOpenApiSource)) {
throw new Error(`Missing BFF OpenAPI file at ${bffOpenApiSource}`)
}

mkdirSync(bffOpenApiDistDir, { recursive: true })
copyFileSync(bffOpenApiSource, bffOpenApiDistFile)
},
},
tidewave(),
vue({script: {defineModel: true}}),
// vueDevTools(),
Expand Down
Loading