GithubHelp home page GithubHelp logo

Comments (4)

guybedford avatar guybedford commented on May 30, 2024 1

@DougAnderson444 make sure you are using the latest @bytecodealliance/preview2-shim version 0.0.9. That one does not have features in the package.json at all.

For the smoke import this is correct if you have a smoke import in the world. Can you share the output of jco wit component.wasm for the component you are transpiling, that should show why there is a smoke import there.

If you don't mean to be importing a smoke interface, perhaps you intent to support a component without a "smoke" import?

Imports can be mapped with the custom --map flag - jco transpile x.wasm --map local:smoke=./smoke.js kind of thing.

from jco.

DougAnderson444 avatar DougAnderson444 commented on May 30, 2024

I think this

import { smokeImports as interface7 } from "smoke"

is supposed to be

import { smokeImports as interface7 } from "./imports/smoke-imports"

But there's only a type definition file smoke-imports.d.ts and there's no smoke-imports.js file. Is there supposed to be one?

from jco.

DougAnderson444 avatar DougAnderson444 commented on May 30, 2024

Answering all my own question here today....

  1. Solved 1 by bringing in the built files into my project folder, then Vite could find the files of course...
  2. Solved 2 by writing my own smoke library with my defined imports and, well, importing it.

🤦‍♂️

I should have known better, but perhaps this will eventually deserve a doc or blog post.

from jco.

guybedford avatar guybedford commented on May 30, 2024

Glad you were able to work through it! Yes we do need better docs and examples, suggestions for how to avoid pitfalls always welcome!

from jco.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.