diff --git a/frontend/vite.config.js b/frontend/vite.config.js index 37c59c6..42bb3f9 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -33,15 +33,16 @@ export default defineConfig(({ mode }) => { }) }, optimizeDeps: { - esbuildOptions: { - plugins: [ - NodeGlobalsPolyfillPlugin({ - buffer: true - }), - NodeModulesPolyfillPlugin() - ] - } - }, + include: ['three', 'three/examples/jsm/loaders/GLTFLoader.js'], + esbuildOptions: { + plugins: [ + NodeGlobalsPolyfillPlugin({ + buffer: true + }), + NodeModulesPolyfillPlugin() + ] + } + }, resolve: { alias: { '@': path.resolve(__dirname, './src'), @@ -50,5 +51,16 @@ export default defineConfig(({ mode }) => { assert: 'assert', } }, + build: { + rollupOptions: { + output: { + // Stelle sicher, dass three nicht externalisiert wird + manualChunks: undefined + } + }, + commonjsOptions: { + include: [/three/, /node_modules/] + } + }, }; });