From 139c3ed5569cb87f8d8f73bd99e55c34e26a304d Mon Sep 17 00:00:00 2001 From: Aria Date: Fri, 18 Mar 2022 15:58:26 +0100 Subject: [PATCH] Set up netlify builds (#100) --- packages/playground/.gitignore | 3 ++- packages/playground/devEnv/vite.config.ts | 5 +++++ packages/playground/package.json | 2 ++ packages/playground/src/public/_redirects | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 packages/playground/src/public/_redirects diff --git a/packages/playground/.gitignore b/packages/playground/.gitignore index 018675f..c82b321 100644 --- a/packages/playground/.gitignore +++ b/packages/playground/.gitignore @@ -1,3 +1,4 @@ /dist /test-results/ -/playwright-report/ \ No newline at end of file +/playwright-report/ +/build \ No newline at end of file diff --git a/packages/playground/devEnv/vite.config.ts b/packages/playground/devEnv/vite.config.ts index fcf3ede..8486841 100644 --- a/packages/playground/devEnv/vite.config.ts +++ b/packages/playground/devEnv/vite.config.ts @@ -20,6 +20,11 @@ const port = 8080 // https://vitejs.dev/config/ export default defineConfig({ root: path.join(playgroundDir, './src'), + build: { + outDir: '../build', + minify: false, + emptyOutDir: true, + }, assetsInclude: ['**/*.gltf', '**/*.glb'], server: { diff --git a/packages/playground/package.json b/packages/playground/package.json index b74ea35..a051400 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -9,6 +9,8 @@ ], "scripts": { "serve": "vite --config ./devEnv/vite.config.ts", + "build:static": "vite --config ./devEnv/vite.config.ts build", + "build:preview": "vite --config ./devEnv/vite.config.ts preview", "typecheck": "yarn run build", "test": "playwright test --config=devEnv/playwright.config.ts", "test:ci": "percy exec -- playwright test --reporter=dot --config=devEnv/playwright.config.ts --project=chromium", diff --git a/packages/playground/src/public/_redirects b/packages/playground/src/public/_redirects new file mode 100644 index 0000000..50a4633 --- /dev/null +++ b/packages/playground/src/public/_redirects @@ -0,0 +1 @@ +/* /index.html 200 \ No newline at end of file