Adding support for code split plugins. (#9184)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
8766690c81
Коммит
82dfe9e61d
@@ -5,6 +5,7 @@ package web
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"mime"
|
||||
"net/http"
|
||||
"path"
|
||||
"path/filepath"
|
||||
@@ -26,6 +27,8 @@ func (w *Web) InitStatic() {
|
||||
|
||||
subpath, _ := utils.GetSubpathFromConfig(w.App.Config())
|
||||
|
||||
mime.AddExtensionType(".wasm", "application/wasm")
|
||||
|
||||
staticHandler := staticHandler(http.StripPrefix(path.Join(subpath, "static"), http.FileServer(http.Dir(staticDir))))
|
||||
pluginHandler := pluginHandler(w.App.Config, http.StripPrefix(path.Join(subpath, "static", "plugins"), http.FileServer(http.Dir(*w.App.Config().PluginSettings.ClientDirectory))))
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user