Building a WASM executable #1119
-
When trying to build, % GOOS=js GOARCH=wasm go build -o g.wasm
# github.com/spf13/viper
/home/alok/go/pkg/mod/github.com/spf13/[email protected]/viper.go:344:19: undefined: fsnotify.NewWatcher
/home/alok/go/pkg/mod/github.com/spf13/[email protected]/viper.go:366:20: select case must be receive, send or assign recv
/home/alok/go/pkg/mod/github.com/spf13/[email protected]/viper.go:393:18: select case must be receive, send or assign recv For other packages, it was simple enough to exclude them from wasm builds with build tags but viper is all over the packages I need. Is there a way to use viper for WASM? |
Beta Was this translation helpful? Give feedback.
Answered by
sagikazarmark
Apr 21, 2021
Replies: 1 comment
-
I guess we could make the watch functionality non-functional on WASM if it doesn't work anyway. We can do that with some build flags. Looks like it's been already reported in #1071 (let's track it there) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
sagikazarmark
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I guess we could make the watch functionality non-functional on WASM if it doesn't work anyway. We can do that with some build flags.
Looks like it's been already reported in #1071 (let's track it there)