Skip to content

snippets directory is not included in files of package.json #1206

@Gu-Miao

Description

@Gu-Miao

/src/lib.rs:

#[wasm_bindgen(module = "/www/utils.js")]
extern "C" {
  fn random(max: usize) -> usize;
}

/www/utils.js:

export function random(max) {
  return Math.round(Math.random() * max)
}

wasm-pack builds correctly:

image

But in package.json, it is not inclueded:

image

I found similar issues: #663, #557, #881. But all of them were not resloved. So I create this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions