This repository was archived by the owner on Jan 11, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 425
Fix 2 issues with custom html files in export #1118
Closed
Closed
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
fc0a759
Revert "leftover css should read from unclaimed modules (#1098)"
Conduitry 9068f42
export: Fix issues with custom html files in export
jamesjnadeau a386a30
use https URL when updating mime-types.md
Conduitry 71e39cc
update mime-types.md
Conduitry 63ffe90
fix vulnerability when serving /client/... files
Conduitry 5e2c686
-> v0.27.11
Conduitry facbd96
bundle mime/lite for MIME type lookups (#1138)
Conduitry b0f342a
-> v0.27.12
Conduitry 8bcdfad
allow multiple slugs in route segment (#1000)
JohnPeel d7b8ae1
update changelog
Conduitry 3bf058c
fix deeplinks no matter previous scroll position (#1139)
ArkaneMoose 87fe373
update changelog
Conduitry 621cc6a
set scrollRestoration to auto for page refresh (#1117)
arekbartnik ca36457
update changelog
Conduitry 85fcec1
when copying files during export, preserve atime and mtime (#1111)
ribizli fffdbc6
update changelog
Conduitry 9d58d8f
docs: clarify assumptions made by `preload` (#1135)
natevaughan 25bad80
update LICENSE copyright year (#1100)
heithemmoumni 9e5a140
do not notify $page subscribers until after navigation (#1165)
pchynoweth a04f319
update changelog
Conduitry 4a0ffd1
when exporting, do not create directories for page routes ending in .…
NOtherDev 769226e
update changelog
Conduitry d02238c
recognize TypeScript configuration files for Rollup and webpack (#1005)
6097e5f
update changelog
Conduitry 2b8601b
-> v0.27.13
Conduitry 69cce85
docs: Zeit -> Vercel (#1190)
JB1905 de7370e
export: Fix issues with custom html files in export
jamesjnadeau a70966d
Merge branch 'patch-1' of github.com:jamesjnadeau/sapper into patch-1
jamesjnadeau 27c418c
:cop: fix formatting to match project style guide
jamesjnadeau File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,7 +112,8 @@ async function _export({ | |
const is_html = type === 'text/html'; | ||
|
||
if (is_html) { | ||
if (pathname !== '/service-worker-index.html') { | ||
if (pathname !== '/service-worker-index.html' | ||
&& pathname.substr(pathname.length - 5) !== '.html') { | ||
file = file === '' ? 'index.html' : `${file}/index.html`; | ||
} | ||
body = minify_html(body); | ||
|
@@ -186,7 +187,7 @@ async function _export({ | |
const cleaned = clean_html(body); | ||
|
||
const base_match = /<base ([\s\S]+?)>/m.exec(cleaned); | ||
const base_href = base_match && get_href(base_match[1]); | ||
const base_href = base_match ? get_href(base_match[1]) : '/' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: don't need the extra space before |
||
const base = resolve(url.href, base_href); | ||
|
||
let match; | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<title>Page Title</title> | ||
</head> | ||
|
||
<body> | ||
<h1>Test Heading</h1> | ||
<p>Test Paragraph.</p> | ||
</body> | ||
|
||
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.