2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-10-23 23:05:52 +00:00

chore: update modman vite setup to support dev server

This commit is contained in:
Jan Laupetin
2025-10-06 21:19:02 +02:00
parent 047fabb546
commit 4f24b9ce86
7 changed files with 164 additions and 96 deletions

View File

@@ -18,6 +18,8 @@
namespace
{
constexpr auto LOCALHOST_PREFIX = "http://localhost:";
std::unordered_map<std::string, UiFile> assetLookup;
std::string WideStringToString(const std::wstring& wideString)
@@ -95,6 +97,13 @@ namespace
const auto uri = WideStringToString(wUri);
bool fileFound = false;
#ifdef _DEBUG
// Allow dev server access
if (uri.starts_with(LOCALHOST_PREFIX))
return S_OK;
#endif
if (uri.starts_with(edge::URL_PREFIX))
{
const auto asset = uri.substr(std::char_traits<char>::length(edge::URL_PREFIX) - 1);

View File

@@ -1,6 +1,6 @@
#pragma once
#include "ui/modmanui.h"
#include "Web/ViteAssets.h"
#include <string>
#include <unordered_map>