Skip to content

Commit 1260ded

Browse files
authored
fix(examples): application crashed when navigating examples in browser (#5938)
fix(examples): application crashed when navigating examples in browser (#5938)
1 parent bba8e2e commit 1260ded

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/server.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ server = http.createServer(function (req, res) {
128128
// Process server request
129129
else if (new RegExp('(' + dirs.join('|') + ')\/server').test(url)) {
130130
if (fs.existsSync(path.join(__dirname, url + '.js'))) {
131-
import('./' + url + '.js').then(module => {
132-
module.default(req, res)
131+
import('file://' + path.join(__dirname, url + '.js')).then((server) => {
132+
server.default(req, res);
133133
});
134134
} else {
135135
send404(res);

0 commit comments

Comments
 (0)