Ignore source map files in %sapper.scripts%

This commit is contained in:
Nolan Lawson
2018-03-18 11:08:31 -07:00
parent cf6621b83c
commit cf90476255

View File

@@ -193,6 +193,7 @@ function get_route_handler(chunks: Record<string, string>, routes: RouteObject[]
let scripts = []
.concat(chunks.main) // chunks main might be an array. it might not! thanks, webpack
.filter(function (file) { return !file.match(/\.map$/); })
.map(file => `<script src='${req.baseUrl}/client/${file}'></script>`)
.join('');
@@ -368,4 +369,4 @@ function try_serialize(data: any) {
} catch (err) {
return null;
}
}
}