Update Vite configuration for improved module resolution and build settings
- Changed the import path for GLTFLoader to align with the latest Three.js structure. - Added preserveSymlinks option to the build configuration for better symlink handling. - Updated Rollup options to explicitly define no external modules, enhancing build clarity.
This commit is contained in:
@@ -33,7 +33,7 @@ export default defineConfig(({ mode }) => {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
optimizeDeps: {
|
optimizeDeps: {
|
||||||
include: ['three', 'three/examples/jsm/loaders/GLTFLoader.js'],
|
include: ['three', 'three/addons/loaders/GLTFLoader.js'],
|
||||||
esbuildOptions: {
|
esbuildOptions: {
|
||||||
plugins: [
|
plugins: [
|
||||||
NodeGlobalsPolyfillPlugin({
|
NodeGlobalsPolyfillPlugin({
|
||||||
@@ -50,14 +50,16 @@ export default defineConfig(({ mode }) => {
|
|||||||
util: 'util',
|
util: 'util',
|
||||||
assert: 'assert',
|
assert: 'assert',
|
||||||
},
|
},
|
||||||
dedupe: ['three']
|
dedupe: ['three'],
|
||||||
|
preserveSymlinks: false
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
output: {
|
output: {
|
||||||
// Stelle sicher, dass three nicht externalisiert wird
|
// Stelle sicher, dass three nicht externalisiert wird
|
||||||
manualChunks: undefined
|
manualChunks: undefined
|
||||||
}
|
},
|
||||||
|
external: [] // Explizit keine externen Module
|
||||||
},
|
},
|
||||||
commonjsOptions: {
|
commonjsOptions: {
|
||||||
include: [/three/, /node_modules/],
|
include: [/three/, /node_modules/],
|
||||||
|
|||||||
Reference in New Issue
Block a user