Skip to content

Import a 3D Model and automatically assign and export animations

TypeScript

Try to use a config change to make both pages work

Scott Petrovic7d1e82b033e7
diff --git a/static/create.html b/src/create.html
similarity index 100%
rename from static/create.html
rename to src/create.html
diff --git a/vite.config.js b/vite.config.js
index 7e92244..0259f48 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -1,25 +1,33 @@
const isCodeSandbox = 'SANDBOX_URL' in process.env || 'CODESANDBOX_HOST' in process.env
+import { resolve } from 'path'
+
// allows us to use external shaders files to be imported into our materials
import glsl from 'vite-plugin-glsl'
export default {
- root: 'src/',
- publicDir: '../static/',
- base: './',
- server:
+ root: 'src/',
+ publicDir: '../static/',
+ base: './',
+ server:
{
- host: true,
- open: !isCodeSandbox // Open if it's not a CodeSandbox
+ host: true,
+ open: !isCodeSandbox // Open if it's not a CodeSandbox
},
- build:
+ build:
{
- outDir: '../dist',
- emptyOutDir: true,
- sourcemap: true
+ outDir: '../dist',
+ emptyOutDir: true,
+ sourcemap: true,
+ rollupOptions: {
+ input: {
+ main: resolve(__dirname, 'src/index.html'),
+ create: resolve(__dirname, 'src/create.html')
+ }
+ }
},
- plugins:
+ plugins:
[
- glsl()
+ glsl()
]
-}
\ No newline at end of file
+}