Commit cbf98f2
Fix: replace 'instant' dependency with 'web-time' (#296)
# The Bug
While using this crate, I encounered an error with my project's wasm
build that went something like this:
```
Module not found: Error: Can't resolve 'env' in 'my-project/pkg'
```
# Finding the source
After a little searching, I found this [helpful
issue](https://github.com/orgs/community/discussions/16289#discussion-4062908)
on the wasm-bindgen repository. I used [this tool](
https://github.com/Liamolucko/find_wasm_import) (mentioned in the issue)
on my project to attempt to find the source of the error, and the source
was the instant crate.
# Solution
In all regards, web_time seems to be superior to instant. Instant even
mentions in [their
readme](https://github.com/sebcrozet/instant/blob/master/README.md) that
the crate is unmaintained and web_time should be considered as an
alternative.
---------
Co-authored-by: Dmitrii Samsonov <[email protected]>1 parent bf8a5f0 commit cbf98f2
File tree
7 files changed
+8
-8
lines changed- crates
- demo-core
- src
- egui_graphs
- src
7 files changed
+8
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
14 | 12 | | |
15 | 13 | | |
| 14 | + | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
0 commit comments