localbase
localbase copied to clipboard
require is not defined problem when using vite
on installing localbase with vite after build, we get the require is not defined coming from let bt = require("ordered-uuid"); Vite doesnt support require
@filigreti Facing the same issue. Have you found a solution?
I'm having the same issue
@filigreti @adnanmasd @dannyconnell I fix this problem with a line of code.
Inside localbase/localbase/api/actions/add.js
I changed the first line of the script with this:
import UUID from 'ordered-uuid'
@dannyconnell It would be nice if you update the npm package with this fix
I am also having this issue in a Vue/Vite project. The fix suggestion from @filigreti works well for me when I can modify the mentioned file locally. But if you are deploying remotely, where the NPM package is loaded by that service (like Netlify), this is still a problem. @dannyconnell Is this a revision you can make?
3 Nov and still same issue ?