4
23
Fork
You've already forked jsdb
3

Docs: Note that minification should not be used with custom data types #11

Open
opened 2024年04月19日 18:29:17 +02:00 by aral · 0 comments
Owner
Copy link

Custom data types use the name of the class that was in memory at the time that the object was persisted to recreate the object when the database is read in.

If the name of the class has changed, this will fail.

Since minification changes the names of classes, you should not use it when using JSDB in your projects.

Similarly, in esbuild, (削除) you should use the --keep-names option so that names are not changed. (削除ここまで) you should stick to --minify-whitespace + --minify-syntax and leave out --minify-identifiers. (see https://esbuild.github.io/api/#minify-considerations)

Custom data types use the name of the class that was in memory at the time that the object was persisted to recreate the object when the database is read in. If the name of the class has changed, this will fail. Since minification changes the names of classes, you should not use it when using JSDB in your projects. Similarly, in esbuild, <strike>you should use the `--keep-names` option so that names are not changed.</strike> you should stick to `--minify-whitespace` + `--minify-syntax` and __leave out `--minify-identifiers`__. (see https://esbuild.github.io/api/#minify-considerations)
Sign in to join this conversation.
No Branch/Tag specified
main
types
set-support
better-custom-objects
typed-arrays
cjs
7.0.1
7.0.0
5.1.0
3.0.0
2.0.7
1.2.3
1.2.2
2.0.6
2.0.5
1.2.1
1.2.0
2.0.4
2.0.3
2.0.1
2.0.0
1.1.5
1.1.4
1.1.3
1.1.2
1.1.0
1.1.1
1.0.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
small-tech/jsdb#11
Reference in a new issue
small-tech/jsdb
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?