Code Monkey home page Code Monkey logo

Comments (5)

bowbahdoe avatar bowbahdoe commented on April 27, 2024 3

It could work similar to how elm works with webpack where a user requires an elm file and that builds into a self contained app.

from yew.

jstarry avatar jstarry commented on April 27, 2024 2

Closing because we now have a template project using webpack here: https://github.com/yewstack/yew-wasm-pack-template

from yew.

machineloop avatar machineloop commented on April 27, 2024 1

@TheLarkInn @deniskolodin This issue from cargo-web summarizes some of the problems faced in a webpack integration: koute/cargo-web#24

from yew.

therustmonk avatar therustmonk commented on April 27, 2024

Hi, Sean! It's cool! I haven't tried to use it with webpack yet. I am sure we need your help with that. 👍 But I don't even know where to start. yew works similar to elm: it removes body content and rebuilds it itself. How it could work? Do we need to add some integration? Maybe provide special entrypoints of API? Or maybe there were wrong questions and we should do something else? )

from yew.

thedodd avatar thedodd commented on April 27, 2024

@deniskolodin && @TheLarkInn so, just to chime in here, the wasm-bindgen ecosystem already has a slew of examples on rust -> wasm -> webpack -> js use cases. There may be a great deal of value in moving towards interoperability on that front.

This path provides deeper interoperability with the JS community, and would unblock my team on a few of the final items which we need in order to use Yew in a production context. Namely, interop with Webpack would allow for a robust bundling pipeline for things like SASS & other assets.

I don't intend for this to be an inflammatory question, by any means, but if we decided to move down the wasm-bindgen path, which allows for interop with tools like webpack & parcel, then what would cargo web be needed for??? @machineloop I mostly bring this up in response to your comment above, as I know that this is something we'll need to address.

After doing some reading through related issues in this repo, wasm-bindgen & cargo-web repos, it looks like — potentially — not too much is actually needed in order to close this gap.

  • rustwasm/wasm-bindgen#197 (comment) seems to indicate that there is one specific crate, maybe a few, which are causing problems with using Yew in the wasm-bindgen context right now.

Thoughts?

from yew.

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.