ark.db icon indicating copy to clipboard operation
ark.db copied to clipboard

Your treeshaking is not working?

Open Mehdi-Hp opened this issue 4 years ago • 1 comments

I'm building this simple file, using vite (practically rollup)

import { LocalStorage } from 'ark.db';


const datastore = new LocalStorage();

function read(dataPath) {
    return datastore.get(dataPath);
}

function write(dataPath, payload) {
    return datastore.set(
        dataPath,
        (payload?.(datastore.get(dataPath)) || payload)
    );
}

export {
    read,
    write
};

Now, my production build is 972.25kb!
It seems the whole Mongoose is in the ark.db's production build.

Mehdi-Hp avatar Jul 16 '21 11:07 Mehdi-Hp

How are you included the ark.db in your project?

thearkxd avatar Jul 16 '22 08:07 thearkxd