first stab at supporting Rollup (#130)

This commit is contained in:
Rich Harris
2018-08-25 12:42:27 -04:00
parent 24f2855f89
commit 9cbb8bdc33
11 changed files with 276 additions and 107 deletions

View File

@@ -320,7 +320,7 @@ function get_page_handler(
}
const link = preloaded_chunks
.filter(file => !file.match(/\.map$/))
.filter(file => file && !file.match(/\.map$/))
.map(file => `<${req.baseUrl}/client/${file}>;rel="preload";as="script"`)
.join(', ');
@@ -484,7 +484,7 @@ function get_page_handler(
let scripts = []
.concat(chunks.main) // chunks main might be an array. it might not! thanks, webpack
.filter(file => !file.match(/\.map$/))
.map(file => `<script src='${req.baseUrl}/client/${file}'></script>`)
.map(file => `<script type="module" src='${req.baseUrl}/client/${file}'></script>`)
.join('');
let inline_script = `__SAPPER__={${[