diff --git a/examples/package.json b/examples/package.json index 960a2ce..d6ae357 100644 --- a/examples/package.json +++ b/examples/package.json @@ -4,8 +4,8 @@ "version": "0.0.0", "type": "module", "scripts": { - "dev": "vite", - "build": "tsc && vite build", + "dev": "vite --config vite.config.ts", + "build": "tsc && vite build --config vite.config.prod.ts", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview" }, diff --git a/examples/vite.config.prod.ts b/examples/vite.config.prod.ts new file mode 100644 index 0000000..7288dbe --- /dev/null +++ b/examples/vite.config.prod.ts @@ -0,0 +1,8 @@ +import react from "@vitejs/plugin-react"; +import { defineConfig } from "vite"; + +// https://vitejs.dev/config/ +export default defineConfig({ + base: "/THREE-CustomShaderMaterial/", + plugins: [react()], +}); diff --git a/examples/vite.config.ts b/examples/vite.config.ts index 6b72fb7..1178592 100644 --- a/examples/vite.config.ts +++ b/examples/vite.config.ts @@ -4,7 +4,6 @@ import { defineConfig } from "vite"; // https://vitejs.dev/config/ export default defineConfig({ - base: "/THREE-CustomShaderMaterial/", plugins: [react()], resolve: { alias: {