Skip to content

Conversation

@connorjclark
Copy link
Collaborator

Minor enhancement.

image

{resourceType: 'script', requestCount: 3, size: '55000±1000'},
{resourceType: 'image', requestCount: 2, size: '28000±1000'},
{resourceType: 'document', requestCount: 1, size: '2100±100'},
{resourceType: 'document', requestCount: 1, size: '2200±100'},
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

went up b/c content-type header is now added for html docs

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh right that's easy to forget that header cost is included in these

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

surprised it took us this long to do this, what a waste of memorizing these paths! 😆

} else if (filePath.endsWith('.json')) {
headers['Content-Type'] = 'application/json';
} else if (filePath.endsWith('.html') || filePath === '/') {
headers['Content-Type'] = 'text/html';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this feels 100% unrelated to the index part, right?

why cause conflicts for yourself in #9542 :)

const fixturePaths = glob.sync('**/*.html', {cwd: __dirname});
const html = `
<h1>Smoke test fixtures</h1>
${fixturePaths.map(p => `<a href=${p}>${p}</a>`).join('<br>')}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this work on windows, like are the paths returned by glob different?

do we care if it doesn't? probably not

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷‍♂

serverForOnline.listen(onlinePort, 'localhost');
serverForOffline.listen(offlinePort, 'localhost');
console.log(`online: listening on http://localhost:${onlinePort}`);
console.log(`offline: listening on http://localhost:${offlinePort}`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's really nothing offline or online about these, it's just how we use them for one(?) of the smoke tests (we also use them for same- and different-origin in other tests), but I'm not sure it matters what we call them :)

@vercel vercel bot temporarily deployed to staging August 12, 2019 22:56 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants