William
01/07/2024, 4:45 PMlocalhost:8080
2. Click on a component
3. Navigate to localhost:8080/submit-review
> submit-review
screen content displayed ✅
But when I refresh the page, I will get Cannot GET /review-submit
error.. did I missed some configuration?Arkadii Ivanov
01/07/2024, 4:56 PMWilliam
01/07/2024, 5:57 PMwebpack.config.d
folder, after that needed to nuke the whole environment for it to work properly, something about the cache was behaving weirdly thank you colorWilliam
01/08/2024, 12:38 PMlocalhost:8080/review/{review_id}
.. it will get runtime errors
Failed to execute 'compile' on 'WebAssembly': HTTP status code is not ok
TypeError: Failed to execute 'compile' on 'WebAssembly': HTTP status code is not ok
due to how uninstantiated.mjs
tried to access composeApp.wasm
via ./composeApp.wasm
path..
Cannot GET /review/composeApp.wasm
The composeApp.wasm
is located at /composeApp.wasm
.. although I think this is a wasm problem not decompose, since the path is set in the .mjs
fileArkadii Ivanov
01/08/2024, 1:10 PMArkadii Ivanov
01/08/2024, 1:11 PMWilliam
01/09/2024, 1:47 AMdevServerConfig.js
but same sad pandaWilliam
01/09/2024, 1:52 AM.mjs
the path is permanently set as ./composeApp.wasm
, if i were to open a url like <https://domain.com/subdirectory1/subdirectory2/subdirectory3>
i will get an error, because in the .mjs
script it's trying to find composeApp.wasm
in <https://domain.com/subdirectory1/subdirectory2/>
instead of from the root <https://domain.com>
.. for now i'll just work with single subdirectory..William
01/10/2024, 3:29 PMdevServerConfig.js
for now 🤷 this allows me to refresh url like <http://localhost:8080/auth/login>
"proxy": {
"/auth": {
target: '<http://localhost:8080>',
pathRewrite: { '^/auth': '' }
}
}
Arkadii Ivanov
01/10/2024, 3:54 PMArkadii Ivanov
01/10/2024, 3:54 PMArkadii Ivanov
01/10/2024, 3:57 PM"historyApiFallback": true
to devServerConfig.js
. Docs: https://webpack.js.org/configuration/dev-server/#devserverhistoryapifallbackArkadii Ivanov
01/10/2024, 3:59 PMkotlin {
js {
browser()
binaries.executable()
}
}
Arkadii Ivanov
01/10/2024, 4:01 PMMantas Varnagiris
04/22/2024, 7:42 PMWilliam
04/24/2024, 2:35 PM../webpack.config.d/devServerConfig.js
just to unblock myself
Example below:
proxy: [
{
target: "<http://localhost:8081>",
context: function(pathname, req) {
if (/^\/auth/.test(pathname)) {
return true
} else if(/^\/review/.test(pathname)) {
return true
} else if(/^\/user/.test(pathname)) {
return true
} else {
return false
}
},
pathRewrite: function(pathname, req) {
if (pathname.indexOf("composeApp.wasm") >= 0) {
return "/composeApp.wasm"
} else {
return "/" + pathname.split("/").pop()
}
}
}
]
Mantas Varnagiris
04/24/2024, 2:50 PMMantas Varnagiris
06/30/2024, 12:40 PM