File tree 3 files changed +12
-4
lines changed
3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ ## v0.0.1 (2025-02-22)
4
+
5
+ - feat: add hooks register exports ([ #684 ] ( https://github.com/hi-ogawa/vite-plugins/pull/684 ) )
6
+
3
7
## v0.0.0 (2024-08-22)
4
8
5
9
- feat: custom node loader for ` .wasm ` and ` .bin ` ([ #622 ] ( https://github.com/hi-ogawa/vite-plugins/pull/622 ) )
Original file line number Diff line number Diff line change @@ -58,12 +58,16 @@ import __wasm_B7t_kJnM from "./resvg-Cjh1zH0p.wasm"
58
58
Custom hooks are provided to run ` .bin ` and ` .wasm ` on Node.
59
59
60
60
``` ts
61
+ // to import "xxx.bin"
62
+ // node --import '@hiogawa/vite-plugin-server-asset/hooks/register-data'
63
+ // or programatically
61
64
import { register } from " node:module"
62
-
63
- // import "xxx.bin"
64
65
register (" @hiogawa/vite-plugin-server-asset/hooks/data" , import .meta .url );
65
66
66
- // import "xxx.wasm"
67
+ // to import "xxx.wasm"
68
+ // node --import '@hiogawa/vite-plugin-server-asset/hooks/register-wasm'
69
+ // or programatically
70
+ import { register } from " node:module"
67
71
register (" @hiogawa/vite-plugin-server-asset/hooks/wasm" , import .meta .url );
68
72
```
69
73
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @hiogawa/vite-plugin-server-asset" ,
3
- "version" : " 0.0.0 " ,
3
+ "version" : " 0.0.1 " ,
4
4
"homepage" : " https://github.com/hi-ogawa/vite-plugins/tree/main/packages/server-asset" ,
5
5
"repository" : {
6
6
"type" : " git" ,
You can’t perform that action at this time.
0 commit comments