-
Notifications
You must be signed in to change notification settings - Fork 1
Description
About bookmarks/soukai/demo, where the app from npm run preview
is behaving differently from the npm run dev
one, Noel wrote:
I looked at the Bookmarks demo and I found the problem. There are two instances of soukai because there is an import to "../../src/modules/Bookmarks" in utils.ts. So the Bookmark model is using one instance of the library (the one inside of bookmarks/soukai/node_modules), whilst the setEngine is using another (the one inside of bookmarks/soukai/demo/node_modules).
I think you can solve this adding the following to the alias in your demo's vite.config.js:
'soukai': path.resolve(__dirname, './node_modules/soukai'),
That way, every time "soukai" is used, it'll import the same folder. Or you could also solve it by using npm workspaces to share the same node_modules folder, etc.
We should try that out!