Skip to content

Commit

Permalink
fix(mainfest): missing _bg.js file in package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Jul 4, 2018
1 parent b0470b0 commit 578c3d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ impl CargoManifest {
fn into_npm(mut self, scope: &Option<String>, disable_dts: bool) -> NpmPackage {
let filename = self.package.name.replace("-", "_");
let wasm_file = format!("{}_bg.wasm", filename);
let js_bg_file = format!("{}_bg.js", filename);
let js_file = format!("{}.js", filename);
let dts_file = if disable_dts == true {
None
Expand All @@ -81,7 +82,7 @@ impl CargoManifest {
if let Some(s) = scope {
self.package.name = format!("@{}/{}", s, self.package.name);
}
let mut files = vec![wasm_file];
let mut files = vec![wasm_file, js_bg_file];

match dts_file {
Some(ref dts_file) => {
Expand Down

0 comments on commit 578c3d0

Please sign in to comment.