Closed liorGameDev closed 1 year ago
It looks like you can get rid of warning by adding alias in your webpack config, in this case your main three.js and three.js from meshline will be imported from the same place
const path = require('path');
module.exports = {
resolve: {
alias: {
three: path.resolve(__dirname, 'node_modules/three')
},
},
};
I ran into this too with vite. For anyone else with this problem:
// vite.config.js
import { defineConfig } from 'vite'
import path from 'path'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [],
resolve: {
alias: {
'three/examples': path.resolve(__dirname, 'node_modules/three/examples/'),
three: path.resolve(__dirname, 'node_modules/three/build/three.module.js'),
},
},
})
@wellcaffeinated Worked for me!
I get this error when trying to use three.meshline I think it is because TTHREE.Meshline imports three.cjs and not three.module.js - is there a way to enforce three.meshline to import three.module.js?