Revert "don't include assets in binary (#3661)"

Ref #3712

This reverts commit 32cbcfe4e9.
This commit is contained in:
Ry Dahl 2020-01-21 10:24:02 -05:00 committed by GitHub
parent 159ac525ae
commit 229eb292f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 18 deletions

View file

@ -45,7 +45,7 @@ pub fn read_file(_s: &mut TSState, v: Value) -> Result<Value, ErrBox> {
let v: ReadFile = serde_json::from_value(v)?;
let (module_name, source_code) = if v.file_name.starts_with("$asset$/") {
let asset = v.file_name.replace("$asset$/", "");
let source_code = crate::get_asset2(&asset)?;
let source_code = crate::get_asset2(&asset)?.to_string();
(asset, source_code)
} else {
assert!(!v.file_name.starts_with("$assets$"), "you meant $asset$");