Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Fix server-side only assets in development #597

Merged
merged 3 commits into from
Oct 29, 2018
Merged

Conversation

rtsao
Copy link
Member

@rtsao rtsao commented Oct 29, 2018

This PR changes assets serving in development to match how it works in production. Assets are no longer served from memory.

Fixes an issue with server-side assets in development not being served correctly. Due to a mistake in the test fixture for this (fixed in this PR), tests were erroneously passing.

Also resolves #547

@rtsao rtsao added the bugfix label Oct 29, 2018
@rtsao rtsao requested a review from ganemone October 29, 2018 22:08
Copy link
Contributor

@KevinGrandon KevinGrandon left a comment

Choose a reason for hiding this comment

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

Looks greatly simplified, so that's awesome. Can't help but feel like we're missing something though, heh. 🤷‍♂️ Might also want @ganemone to look, up to you!

const hoistedUrl = assetUrl('./static/test.css');
if (typeof window !== 'undefined') {
window.__hoistedUrl__ = hoistedUrl;
}

import {serverAsset} from "./server-asset.js";
Copy link
Contributor

Choose a reason for hiding this comment

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

Whoa, this file just didn't exist before? 😮

Copy link
Member Author

Choose a reason for hiding this comment

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

It existed, but was empty 😞

@rtsao
Copy link
Member Author

rtsao commented Oct 29, 2018

!merge

@old-fusion-bot old-fusion-bot bot merged commit 6e2fe8b into master Oct 29, 2018
@AlexMSmithCA AlexMSmithCA mentioned this pull request Oct 29, 2018
@AlexMSmithCA AlexMSmithCA mentioned this pull request Nov 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Differences in asset serving in prod vs dev
3 participants