Procházet zdrojové kódy

example: fix docs and env for Vite examples (#4018)

Antoine du Hamel před 2 roky
rodič
revize
5353874083

+ 1 - 0
examples/vue/README.md

@@ -7,5 +7,6 @@ To run the example, from the root directory of this repo, run the following comm
 
 ```sh
 corepack yarn install
+corepack yarn build
 corepack yarn workspace @uppy-example/vue2 dev
 ```

+ 1 - 0
examples/vue3/README.md

@@ -5,5 +5,6 @@ To run the example, from the root directory of this repo, run the following comm
 ```sh
 cp .env.example .env
 corepack yarn install
+corepack yarn build
 corepack yarn workspace @uppy-example/vue3 dev
 ```

+ 4 - 0
examples/vue3/vite.config.js

@@ -1,7 +1,11 @@
+import { fileURLToPath } from 'node:url'
 import { defineConfig } from 'vite'
 import vue from '@vitejs/plugin-vue'
 
+const ROOT = new URL('../../', import.meta.url)
+
 // https://vitejs.dev/config/
 export default defineConfig({
+  envDir: fileURLToPath(ROOT),
   plugins: [vue()],
 })