Avatar
omochimetaru 5/14/2024 3:53 PM
@Yuta Saito https://github.com/swiftwasm/carton/blob/e0dbe6a2fe470a626faa981843c7c9323adc8925/Sources/CartonKit/Server/Application.swift#L67 Cartonのdev serverが、 test コマンドの場合に test.js を返す制御ってどこですか? configuration.entrypointtest.js って書いてあるんだけど、 routerの実装で configuration.entrypoint を読んでる部分がないので、 配送できないように見える 実際 index.html は取れるけど test.js は取れない [omochi@omochi-mbp swift-react (swift510 *%)]$ curl -v http://127.0.0.1:8080/ * Trying 127.0.0.1:8080... * Connected to 127.0.0.1 (127.0.0.1) port 8080 > GET / HTTP/1.1 > Host: 127.0.0.1:8080 > User-Agent: curl/8.6.0 > Accept: */* > < HTTP/1.1 200 OK < Content-Type: text/html < Content-Length: 228 < Connection: close < <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <script type="module" src="test.js"></script> </head> <body> </body> * Closing connection </html>% [omochi@omochi-mbp swift-react (swift510 *%)]$ curl -v http://127.0.0.1:8080/test.js * Trying 127.0.0.1:8080... * Connected to 127.0.0.1 (127.0.0.1) port 8080 > GET /test.js HTTP/1.1 > Host: 127.0.0.1:8080 > User-Agent: curl/8.6.0 > Accept: */* > < HTTP/1.1 404 Not Found < Connection: close < Content-Length: 0 < * Closing connection
📦 Watcher, bundler, and test runner for your SwiftWasm apps - swiftwasm/carton
3:57 PM
あ〜もしかして .carton/static