2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-05 16:42:32 +03:00

fix(examples): application crashed when navigating examples in browser (#5938)

fix(examples): application crashed when navigating examples in browser (#5938)
This commit is contained in:
Nitin Ramnani
2025-01-31 00:55:28 +05:30
committed by GitHub
parent bba8e2e47d
commit 1260ded634
+2 -2
View File
@@ -128,8 +128,8 @@ server = http.createServer(function (req, res) {
// Process server request
else if (new RegExp('(' + dirs.join('|') + ')\/server').test(url)) {
if (fs.existsSync(path.join(__dirname, url + '.js'))) {
import('./' + url + '.js').then(module => {
module.default(req, res)
import('file://' + path.join(__dirname, url + '.js')).then((server) => {
server.default(req, res);
});
} else {
send404(res);